drivers/char/vt.c:vc_do_resize(): local var `end' should be unsigned long
authorqiaochong <qiaochong@loongson.cn>
Tue, 10 Aug 2010 00:21:27 +0000 (17:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Aug 2010 03:45:11 +0000 (20:45 -0700)
According include/linux/console_struct.h,vc_scr_end is unsigned long.

struct vc_data {
    unsigned short  vc_num;         /* Console number */
    unsigned int    vc_cols;        /* [#] Console size */
    unsigned int    vc_rows;
    unsigned int    vc_size_row;        /* Bytes per row */
    unsigned int    vc_scan_lines;      /* # of scan lines */
    unsigned long   vc_origin;      /* [!] Start of real screen */
    unsigned long   vc_scr_end;     /* [!] End of real screen */
    unsigned long   vc_visible_origin;  /* [!] Top of visible window */
    unsigned int    vc_top, vc_bottom;  /* Scrolling region */
    const struct consw *vc_sw;
    unsigned short  *vc_screenbuf;
...
}

Signed-off-by: qiaochong <qiaochong@loongson.cn>
Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/vt.c

index cff1d4bce21d2da1d75aa55f6019571920617acf..44f03ddd8871ae1d85940c26d850bbbd2537990d 100644 (file)
@@ -837,9 +837,10 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
                                unsigned int cols, unsigned int lines)
 {
        unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
+       unsigned long end;
        unsigned int old_cols, old_rows, old_row_size, old_screen_size;
        unsigned int new_cols, new_rows, new_row_size, new_screen_size;
-       unsigned int end, user;
+       unsigned int user;
        unsigned short *newscreen;
 
        WARN_CONSOLE_UNLOCKED();