浏览代码

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>
roel kluin 16 年之前
父节点
当前提交
3d26825ec0
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      drivers/char/hvc_console.h
  2. 1 1
      drivers/char/hvcs.c
  3. 1 1
      drivers/char/hvsi.c

+ 1 - 1
drivers/char/hvc_console.h

@@ -48,7 +48,7 @@ struct hvc_struct {
 	spinlock_t lock;
 	spinlock_t lock;
 	int index;
 	int index;
 	struct tty_struct *tty;
 	struct tty_struct *tty;
-	unsigned int count;
+	int count;
 	int do_wakeup;
 	int do_wakeup;
 	char *outbuf;
 	char *outbuf;
 	int outbuf_size;
 	int outbuf_size;

+ 1 - 1
drivers/char/hvcs.c

@@ -269,7 +269,7 @@ struct hvcs_struct {
 	unsigned int index;
 	unsigned int index;
 
 
 	struct tty_struct *tty;
 	struct tty_struct *tty;
-	unsigned int open_count;
+	int open_count;
 
 
 	/*
 	/*
 	 * Used to tell the driver kernel_thread what operations need to take
 	 * Used to tell the driver kernel_thread what operations need to take

+ 1 - 1
drivers/char/hvsi.c

@@ -75,7 +75,7 @@ struct hvsi_struct {
 	spinlock_t lock;
 	spinlock_t lock;
 	int index;
 	int index;
 	struct tty_struct *tty;
 	struct tty_struct *tty;
-	unsigned int count;
+	int count;
 	uint8_t throttle_buf[128];
 	uint8_t throttle_buf[128];
 	uint8_t outbuf[N_OUTBUF]; /* to implement write_room and chars_in_buffer */
 	uint8_t outbuf[N_OUTBUF]; /* to implement write_room and chars_in_buffer */
 	/* inbuf is for packet reassembly. leave a little room for leftovers. */
 	/* inbuf is for packet reassembly. leave a little room for leftovers. */