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: ipoctal: 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: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Cc: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: industrypack-devel@lists.sourceforge.net
Link: https://lore.kernel.org/r/20231206073712.17776-14-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
2f982313 f32fcbed

+6 -8
+6 -8
drivers/ipack/devices/ipoctal.c
··· 158 158 static void ipoctal_irq_rx(struct ipoctal_channel *channel, u8 sr) 159 159 { 160 160 struct tty_port *port = &channel->tty_port; 161 - unsigned char value; 162 - unsigned char flag; 163 - u8 isr; 161 + u8 isr, value, flag; 164 162 165 163 do { 166 164 value = ioread8(&channel->regs->r.rhr); ··· 200 202 201 203 static void ipoctal_irq_tx(struct ipoctal_channel *channel) 202 204 { 203 - unsigned char value; 204 205 unsigned int *pointer_write = &channel->pointer_write; 206 + u8 value; 205 207 206 208 if (channel->nb_bytes == 0) 207 209 return; ··· 434 436 return res; 435 437 } 436 438 437 - static inline int ipoctal_copy_write_buffer(struct ipoctal_channel *channel, 438 - const u8 *buf, int count) 439 + static inline size_t ipoctal_copy_write_buffer(struct ipoctal_channel *channel, 440 + const u8 *buf, size_t count) 439 441 { 440 442 unsigned long flags; 441 - int i; 443 + size_t i; 442 444 unsigned int *pointer_read = &channel->pointer_read; 443 445 444 446 /* Copy the bytes from the user buffer to the internal one */ ··· 460 462 size_t count) 461 463 { 462 464 struct ipoctal_channel *channel = tty->driver_data; 463 - unsigned int char_copied; 465 + size_t char_copied; 464 466 465 467 char_copied = ipoctal_copy_write_buffer(channel, buf, count); 466 468