Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tty: n_gsm: convert to u8 and size_t

Switch character types to u8 and sizes to size_t. To conform to
characters/sizes in the rest of the tty layer.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20231206073712.17776-20-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
eb7e45db 59b94335

+8 -9
+8 -9
drivers/tty/n_gsm.c
··· 124 124 u8 addr; /* DLCI address + flags */ 125 125 u8 ctrl; /* Control byte + flags */ 126 126 unsigned int len; /* Length of data block (can be zero) */ 127 - unsigned char *data; /* Points into buffer but not at the start */ 128 - unsigned char buffer[]; 127 + u8 *data; /* Points into buffer but not at the start */ 128 + u8 buffer[]; 129 129 }; 130 130 131 131 enum gsm_dlci_state { ··· 283 283 /* Bits for GSM mode decoding */ 284 284 285 285 /* Framing Layer */ 286 - unsigned char *buf; 286 + u8 *buf; 287 287 enum gsm_mux_state state; 288 288 unsigned int len; 289 289 unsigned int address; ··· 2856 2856 * Receive bytes in gsm mode 0 2857 2857 */ 2858 2858 2859 - static void gsm0_receive(struct gsm_mux *gsm, unsigned char c) 2859 + static void gsm0_receive(struct gsm_mux *gsm, u8 c) 2860 2860 { 2861 2861 unsigned int len; 2862 2862 ··· 2947 2947 * Receive bytes in mode 1 (Advanced option) 2948 2948 */ 2949 2949 2950 - static void gsm1_receive(struct gsm_mux *gsm, unsigned char c) 2950 + static void gsm1_receive(struct gsm_mux *gsm, u8 c) 2951 2951 { 2952 2952 /* handle XON/XOFF */ 2953 2953 if ((c & ISO_IEC_646_MASK) == XON) { ··· 3541 3541 const u8 *fp, size_t count) 3542 3542 { 3543 3543 struct gsm_mux *gsm = tty->disc_data; 3544 - char flags = TTY_NORMAL; 3544 + u8 flags = TTY_NORMAL; 3545 3545 3546 3546 if (debug & DBG_DATA) 3547 3547 gsm_hex_dump_bytes(__func__, cp, count); ··· 3711 3711 { 3712 3712 struct gsm_mux *gsm = tty->disc_data; 3713 3713 unsigned long flags; 3714 - int space; 3714 + size_t space; 3715 3715 int ret; 3716 3716 3717 3717 if (!gsm) ··· 3909 3909 net->stats.tx_errors++; 3910 3910 } 3911 3911 3912 - static void gsm_mux_rx_netchar(struct gsm_dlci *dlci, 3913 - const unsigned char *in_buf, int size) 3912 + static void gsm_mux_rx_netchar(struct gsm_dlci *dlci, const u8 *in_buf, int size) 3914 3913 { 3915 3914 struct net_device *net = dlci->net; 3916 3915 struct sk_buff *skb;