aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2014-02-19 15:00:13 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-28 19:25:47 -0500
commitbd2fe272a8ec3841189e07a9a8e9879fe26a3cdc (patch)
treee5ad418c4b37010c21c4b4d3778d5cada95ac75e /drivers
parent8301bb240d0f1b1521b83342f3af8edab7131361 (diff)
drivers/tty/serial: deal with 8250_core.c uninitialized warning for good
Every couple of months, someone sends a patch to fix: drivers/tty/serial/8250/8250_core.c: In function 'serial_unlink_irq_chain': drivers/tty/serial/8250/8250_core.c:1712:2: warning: 'i' may be used uninitialized in this function [-Wuninitialized] and they in turn get a NACK for their efforts, and are told that their compiler is broken. This has been going on since at least the year 2008: https://lkml.org/lkml/2008/11/24/433 Lets add a comment, so that subsequent patches don't get as far as the maintainers or the mailing lists. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/8250/8250_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 69932b7556cf..747073b8c38a 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -1694,6 +1694,10 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
1694 1694
1695static void serial_unlink_irq_chain(struct uart_8250_port *up) 1695static void serial_unlink_irq_chain(struct uart_8250_port *up)
1696{ 1696{
1697 /*
1698 * yes, some broken gcc emit "warning: 'i' may be used uninitialized"
1699 * but no, we are not going to take a patch that assigns NULL below.
1700 */
1697 struct irq_info *i; 1701 struct irq_info *i;
1698 struct hlist_node *n; 1702 struct hlist_node *n;
1699 struct hlist_head *h; 1703 struct hlist_head *h;