LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* tty warning
@ 2008-11-06 4:24 Stephen Rothwell
2008-11-06 4:25 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Stephen Rothwell @ 2008-11-06 4:24 UTC (permalink / raw)
To: Alan Cox; +Cc: David S. Miller, LKML, William L. Irwin, sparclinux
[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]
Hi Alan,
A sparc allmodconfig build gives these warnings:
drivers/char/n_tty.c: In function 'n_tty_poll':
drivers/char/n_tty.c:1592: warning: array subscript is above array bounds
drivers/char/n_tty.c:1601: warning: array subscript is above array bounds
drivers/char/n_tty.c: In function 'n_tty_read':
drivers/char/n_tty.c:1306: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c: In function 'set_termios':
drivers/char/tty_ioctl.c:574: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:578: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c: In function 'tty_mode_ioctl':
drivers/char/tty_ioctl.c:729: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:963: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:969: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:618: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:1007: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:1015: warning: array subscript is above array bounds
These are things like:
termios->c_cc[VTIME] = 0;
termios is a (struct ktermios *) which has "cc_t c_cc[NCCS];". NCCS is
17 and VTIME is also 17. I assume the intention is to actually fill in
_x_cc[0], but why is it done this way and not more directly?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tty warning
2008-11-06 4:24 tty warning Stephen Rothwell
@ 2008-11-06 4:25 ` David Miller
2008-11-06 4:35 ` Stephen Rothwell
2008-11-06 10:18 ` Alan Cox
2008-11-06 11:52 ` Robert Reif
2 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-11-06 4:25 UTC (permalink / raw)
To: sfr; +Cc: alan, linux-kernel, wli, sparclinux
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 6 Nov 2008 15:24:21 +1100
> These are things like:
>
> termios->c_cc[VTIME] = 0;
>
> termios is a (struct ktermios *) which has "cc_t c_cc[NCCS];". NCCS is
> 17 and VTIME is also 17. I assume the intention is to actually fill in
> _x_cc[0], but why is it done this way and not more directly?
It's just some historical stuff.
I've tried to rectify it, but it is non-trivial to fix and
all it does is pacify a warning rather than fix a real problem
so... ;-)
This has been brought up perhaps 5 or 6 times in the past half
year :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tty warning
2008-11-06 4:25 ` David Miller
@ 2008-11-06 4:35 ` Stephen Rothwell
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2008-11-06 4:35 UTC (permalink / raw)
To: David Miller; +Cc: alan, linux-kernel, wli, sparclinux
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
Hi Dave,
On Wed, 05 Nov 2008 20:25:57 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 6 Nov 2008 15:24:21 +1100
>
> > These are things like:
> >
> > termios->c_cc[VTIME] = 0;
> >
> > termios is a (struct ktermios *) which has "cc_t c_cc[NCCS];". NCCS is
> > 17 and VTIME is also 17. I assume the intention is to actually fill in
> > _x_cc[0], but why is it done this way and not more directly?
>
> It's just some historical stuff.
>
> I've tried to rectify it, but it is non-trivial to fix and
> all it does is pacify a warning rather than fix a real problem
> so... ;-)
>
> This has been brought up perhaps 5 or 6 times in the past half
> year :)
Yeah, I guess that is when the compilers started complaining.
Oh, well :-(
[BTW, the number of warnings is itself becoming a real problem ... :-( ]
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tty warning
2008-11-06 4:24 tty warning Stephen Rothwell
2008-11-06 4:25 ` David Miller
@ 2008-11-06 10:18 ` Alan Cox
2008-11-06 11:52 ` Robert Reif
2 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2008-11-06 10:18 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: David S. Miller, LKML, William L. Irwin, sparclinux
On Thu, 6 Nov 2008 15:24:21 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Alan,
>
> A sparc allmodconfig build gives these warnings:
Blame Dave, although its a bit unfair as the Sparc32 does some weirdness
that the compiler didn't use to be smart enough to complain about and is
actually valid for sparc32 at least.
Alan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tty warning
2008-11-06 4:24 tty warning Stephen Rothwell
2008-11-06 4:25 ` David Miller
2008-11-06 10:18 ` Alan Cox
@ 2008-11-06 11:52 ` Robert Reif
2008-11-13 7:52 ` David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Robert Reif @ 2008-11-06 11:52 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Alan Cox, David S. Miller, LKML, William L. Irwin, sparclinux
Stephen Rothwell wrote:
> Hi Alan,
>
> A sparc allmodconfig build gives these warnings:
>
> drivers/char/n_tty.c: In function 'n_tty_poll':
> drivers/char/n_tty.c:1592: warning: array subscript is above array bounds
> drivers/char/n_tty.c:1601: warning: array subscript is above array bounds
> drivers/char/n_tty.c: In function 'n_tty_read':
> drivers/char/n_tty.c:1306: warning: array subscript is above array bounds
> drivers/char/tty_ioctl.c: In function 'set_termios':
> drivers/char/tty_ioctl.c:574: warning: array subscript is above array bounds
> drivers/char/tty_ioctl.c:578: warning: array subscript is above array bounds
> drivers/char/tty_ioctl.c: In function 'tty_mode_ioctl':
> drivers/char/tty_ioctl.c:729: warning: array subscript is above array bounds
> drivers/char/tty_ioctl.c:963: warning: array subscript is above array bounds
> drivers/char/tty_ioctl.c:969: warning: array subscript is above array bounds
> drivers/char/tty_ioctl.c:618: warning: array subscript is above array bounds
> drivers/char/tty_ioctl.c:1007: warning: array subscript is above array bounds
> drivers/char/tty_ioctl.c:1015: warning: array subscript is above array bounds
>
> These are things like:
>
> termios->c_cc[VTIME] = 0;
>
> termios is a (struct ktermios *) which has "cc_t c_cc[NCCS];". NCCS is
> 17 and VTIME is also 17. I assume the intention is to actually fill in
> _x_cc[0], but why is it done this way and not more directly?
>
>
There is a patch here that fixes it:
http://marc.info/?l=linux-sparc&m=122048348932653&w=2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tty warning
2008-11-06 11:52 ` Robert Reif
@ 2008-11-13 7:52 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2008-11-13 7:52 UTC (permalink / raw)
To: reif; +Cc: sfr, alan, linux-kernel, wli, sparclinux
From: Robert Reif <reif@earthlink.net>
Date: Thu, 06 Nov 2008 06:52:03 -0500
> There is a patch here that fixes it: http://marc.info/?l=linux-sparc&m=122048348932653&w=2
Ok, I've applied this, let's see how it goes ;-)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-11-13 7:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-06 4:24 tty warning Stephen Rothwell
2008-11-06 4:25 ` David Miller
2008-11-06 4:35 ` Stephen Rothwell
2008-11-06 10:18 ` Alan Cox
2008-11-06 11:52 ` Robert Reif
2008-11-13 7:52 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).