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

tty: ehv_bytechan: 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>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20231206073712.17776-11-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
0d08abb9 e17934c1

+5 -6
+5 -6
drivers/tty/ehv_bytechan.c
··· 49 49 unsigned int tx_irq; 50 50 51 51 spinlock_t lock; /* lock for transmit buffer */ 52 - unsigned char buf[BUF_SIZE]; /* transmit circular buffer */ 52 + u8 buf[BUF_SIZE]; /* transmit circular buffer */ 53 53 unsigned int head; /* circular buffer head */ 54 54 unsigned int tail; /* circular buffer tail */ 55 55 ··· 138 138 139 139 static unsigned int local_ev_byte_channel_send(unsigned int handle, 140 140 unsigned int *count, 141 - const char *p) 141 + const u8 *p) 142 142 { 143 - char buffer[EV_BYTE_CHANNEL_MAX_BYTES]; 143 + u8 buffer[EV_BYTE_CHANNEL_MAX_BYTES]; 144 144 unsigned int c = *count; 145 145 146 146 /* ··· 166 166 * has been sent, or if some error has occurred. 167 167 * 168 168 */ 169 - static void byte_channel_spin_send(const char data) 169 + static void byte_channel_spin_send(const u8 data) 170 170 { 171 171 int ret, count; 172 172 ··· 474 474 { 475 475 struct ehv_bc_data *bc = ttys->driver_data; 476 476 unsigned long flags; 477 - unsigned int len; 478 - unsigned int written = 0; 477 + size_t len, written = 0; 479 478 480 479 while (1) { 481 480 spin_lock_irqsave(&bc->lock, flags);