* + char-cyclades-fix-compiler-warning.patch added to -mm tree
@ 2009-11-20 23:46 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2009-11-20 23:46 UTC (permalink / raw)
To: mm-commits; +Cc: jslaby, akpm, alan, gregkh, jirislaby, linux
The patch titled
Char: cyclades, fix compiler warning
has been added to the -mm tree. Its filename is
char-cyclades-fix-compiler-warning.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: Char: cyclades, fix compiler warning
From: Jiri Slaby <jslaby@novell.com>
With gcc 4.0.2:
drivers/char/cyclades.c: In function 'cyy_interrupt':
drivers/char/cyclades.c:581: warning: 'info' may be used uninitialized in this function
introduced by
: commit 3aeea5b92210083c7cffd4f08a0bb141d3f2d574
: Author: Jiri Slaby <jirislaby@gmail.com>
: AuthorDate: Sat Sep 19 13:13:16 2009 -0700
: Commit: Live-CD User <linux@linux.site>
: CommitDate: Sat Sep 19 13:13:16 2009 -0700
:
: cyclades: introduce cyy_readb/writeb
In fact the true branch which uses uninitialized 'info' can never
happen because chip is always less than ->nchips and channel is
always less than 4 which we alloc.
So behave similar to rx handling and remove the test completely.
I wonder why gcc 4.4.1 doesn't spit a word.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jiri Slaby <jslaby@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/char/cyclades.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff -puN drivers/char/cyclades.c~char-cyclades-fix-compiler-warning drivers/char/cyclades.c
--- a/drivers/char/cyclades.c~char-cyclades-fix-compiler-warning
+++ a/drivers/char/cyclades.c
@@ -595,14 +595,8 @@ static void cyy_chip_tx(struct cyclades_
channel = save_xir & CyIRChannel;
save_car = readb(base_addr + (CyCAR << index));
cy_writeb(base_addr + (CyCAR << index), save_xir);
- info = &cinfo->ports[channel + chip * 4];
- /* validate the port# (as configured and open) */
- if (channel + chip * 4 >= cinfo->nports) {
- cy_writeb(base_addr + (CySRER << index),
- readb(base_addr + (CySRER << index)) & ~CyTxRdy);
- goto end;
- }
+ info = &cinfo->ports[channel + chip * 4];
tty = tty_port_tty_get(&info->port);
if (tty == NULL) {
cyy_writeb(info, CySRER, cyy_readb(info, CySRER) & ~CyTxRdy);
_
Patches currently in -mm which might be from jslaby@novell.com are
char-cyclades-fix-compiler-warning.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-11-20 23:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-20 23:46 + char-cyclades-fix-compiler-warning.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.