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

powerpc: Make open count variables signed in hvcs/hvsi/hvc_console

Otherwise the tests for count < 0 will never be true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

roel kluin and committed by
Paul Mackerras
3d26825e dc42149f

+3 -3
+1 -1
drivers/char/hvc_console.h
··· 48 48 spinlock_t lock; 49 49 int index; 50 50 struct tty_struct *tty; 51 - unsigned int count; 51 + int count; 52 52 int do_wakeup; 53 53 char *outbuf; 54 54 int outbuf_size;
+1 -1
drivers/char/hvcs.c
··· 269 269 unsigned int index; 270 270 271 271 struct tty_struct *tty; 272 - unsigned int open_count; 272 + int open_count; 273 273 274 274 /* 275 275 * Used to tell the driver kernel_thread what operations need to take
+1 -1
drivers/char/hvsi.c
··· 75 75 spinlock_t lock; 76 76 int index; 77 77 struct tty_struct *tty; 78 - unsigned int count; 78 + int count; 79 79 uint8_t throttle_buf[128]; 80 80 uint8_t outbuf[N_OUTBUF]; /* to implement write_room and chars_in_buffer */ 81 81 /* inbuf is for packet reassembly. leave a little room for leftovers. */