sparc: Fix tty compile warnings.

This patch fixes tty compile warnings as sugested by Alan Cox:

CC drivers/char/n_tty.o
drivers/char/n_tty.c: In function ‘normal_poll’:
drivers/char/n_tty.c:1555: warning: array subscript is above array bounds
drivers/char/n_tty.c:1564: warning: array subscript is above array bounds
drivers/char/n_tty.c: In function ‘read_chan’:
drivers/char/n_tty.c:1269: warning: array subscript is above array bounds
CC drivers/char/tty_ioctl.o
drivers/char/tty_ioctl.c: In function ‘set_termios’:
drivers/char/tty_ioctl.c:533: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:537: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c: In function ‘tty_mode_ioctl’:
drivers/char/tty_ioctl.c:662: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:892: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:896: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:577: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:928: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:934: warning: array subscript is above array
bounds

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Robert Reif and committed by David S. Miller e64ed022 5acdc1fa

+5 -6
+5 -6
arch/sparc/include/asm/termbits.h
··· 29 tcflag_t c_cflag; /* control mode flags */ 30 tcflag_t c_lflag; /* local mode flags */ 31 cc_t c_line; /* line discipline */ 32 cc_t c_cc[NCCS]; /* control characters */ 33 - #ifdef __KERNEL__ 34 #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) 35 - cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ 36 #endif 37 }; 38 ··· 43 tcflag_t c_cflag; /* control mode flags */ 44 tcflag_t c_lflag; /* local mode flags */ 45 cc_t c_line; /* line discipline */ 46 - cc_t c_cc[NCCS]; /* control characters */ 47 - cc_t _x_cc[2]; /* padding to match ktermios */ 48 speed_t c_ispeed; /* input speed */ 49 speed_t c_ospeed; /* output speed */ 50 }; ··· 54 tcflag_t c_cflag; /* control mode flags */ 55 tcflag_t c_lflag; /* local mode flags */ 56 cc_t c_line; /* line discipline */ 57 - cc_t c_cc[NCCS]; /* control characters */ 58 - cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ 59 speed_t c_ispeed; /* input speed */ 60 speed_t c_ospeed; /* output speed */ 61 };
··· 29 tcflag_t c_cflag; /* control mode flags */ 30 tcflag_t c_lflag; /* local mode flags */ 31 cc_t c_line; /* line discipline */ 32 + #ifndef __KERNEL__ 33 cc_t c_cc[NCCS]; /* control characters */ 34 + #else 35 + cc_t c_cc[NCCS+2]; /* kernel needs 2 more to hold vmin/vtime */ 36 #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) 37 #endif 38 }; 39 ··· 42 tcflag_t c_cflag; /* control mode flags */ 43 tcflag_t c_lflag; /* local mode flags */ 44 cc_t c_line; /* line discipline */ 45 + cc_t c_cc[NCCS+2]; /* control characters */ 46 speed_t c_ispeed; /* input speed */ 47 speed_t c_ospeed; /* output speed */ 48 }; ··· 54 tcflag_t c_cflag; /* control mode flags */ 55 tcflag_t c_lflag; /* local mode flags */ 56 cc_t c_line; /* line discipline */ 57 + cc_t c_cc[NCCS+2]; /* control characters */ 58 speed_t c_ispeed; /* input speed */ 59 speed_t c_ospeed; /* output speed */ 60 };