mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-22 13:54:57 +08:00
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>
This commit is contained in:
parent
59b943356b
commit
eb7e45db2e
@ -124,8 +124,8 @@ struct gsm_msg {
|
||||
u8 addr; /* DLCI address + flags */
|
||||
u8 ctrl; /* Control byte + flags */
|
||||
unsigned int len; /* Length of data block (can be zero) */
|
||||
unsigned char *data; /* Points into buffer but not at the start */
|
||||
unsigned char buffer[];
|
||||
u8 *data; /* Points into buffer but not at the start */
|
||||
u8 buffer[];
|
||||
};
|
||||
|
||||
enum gsm_dlci_state {
|
||||
@ -283,7 +283,7 @@ struct gsm_mux {
|
||||
/* Bits for GSM mode decoding */
|
||||
|
||||
/* Framing Layer */
|
||||
unsigned char *buf;
|
||||
u8 *buf;
|
||||
enum gsm_mux_state state;
|
||||
unsigned int len;
|
||||
unsigned int address;
|
||||
@ -2856,7 +2856,7 @@ invalid:
|
||||
* Receive bytes in gsm mode 0
|
||||
*/
|
||||
|
||||
static void gsm0_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
static void gsm0_receive(struct gsm_mux *gsm, u8 c)
|
||||
{
|
||||
unsigned int len;
|
||||
|
||||
@ -2947,7 +2947,7 @@ static void gsm0_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
* Receive bytes in mode 1 (Advanced option)
|
||||
*/
|
||||
|
||||
static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
static void gsm1_receive(struct gsm_mux *gsm, u8 c)
|
||||
{
|
||||
/* handle XON/XOFF */
|
||||
if ((c & ISO_IEC_646_MASK) == XON) {
|
||||
@ -3541,7 +3541,7 @@ static void gsmld_receive_buf(struct tty_struct *tty, const u8 *cp,
|
||||
const u8 *fp, size_t count)
|
||||
{
|
||||
struct gsm_mux *gsm = tty->disc_data;
|
||||
char flags = TTY_NORMAL;
|
||||
u8 flags = TTY_NORMAL;
|
||||
|
||||
if (debug & DBG_DATA)
|
||||
gsm_hex_dump_bytes(__func__, cp, count);
|
||||
@ -3711,7 +3711,7 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
|
||||
{
|
||||
struct gsm_mux *gsm = tty->disc_data;
|
||||
unsigned long flags;
|
||||
int space;
|
||||
size_t space;
|
||||
int ret;
|
||||
|
||||
if (!gsm)
|
||||
@ -3909,8 +3909,7 @@ static void gsm_mux_net_tx_timeout(struct net_device *net, unsigned int txqueue)
|
||||
net->stats.tx_errors++;
|
||||
}
|
||||
|
||||
static void gsm_mux_rx_netchar(struct gsm_dlci *dlci,
|
||||
const unsigned char *in_buf, int size)
|
||||
static void gsm_mux_rx_netchar(struct gsm_dlci *dlci, const u8 *in_buf, int size)
|
||||
{
|
||||
struct net_device *net = dlci->net;
|
||||
struct sk_buff *skb;
|
||||
|
Loading…
Reference in New Issue
Block a user