Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932688Ab3COVZB (ORCPT ); Fri, 15 Mar 2013 17:25:01 -0400 Received: from mail-ia0-f170.google.com ([209.85.210.170]:35945 "EHLO mail-ia0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932531Ab3COVY7 (ORCPT ); Fri, 15 Mar 2013 17:24:59 -0400 MIME-Version: 1.0 In-Reply-To: <20130315203010.GA25081@kroah.com> References: <1362360907-4439-1-git-send-email-grant.likely@secretlab.ca> <20130315203010.GA25081@kroah.com> From: Grant Likely Date: Fri, 15 Mar 2013 21:24:38 +0000 X-Google-Sender-Auth: nz0tXpbHCT5sdeqY9o5NujWscE4 Message-ID: Subject: Re: [PATCH] tty/serial: Fix uninitialized variable warning To: Greg Kroah-Hartman Cc: "linux-serial@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1401 Lines: 31 On Fri, Mar 15, 2013 at 8:30 PM, Greg Kroah-Hartman wrote: > On Mon, Mar 04, 2013 at 09:35:07AM +0800, Grant Likely wrote: >> drivers/tty/serial/8250/8250.c: In function 'serial_unlink_irq_chain': >> drivers/tty/serial/8250/8250.c:1676:19: warning: 'i' may be used uninitialized in this function >> >> There isn't an actual bug here since the function tests the condition >> that would cause i to be uninitialized before dereferencing i. However, >> at least some versions of GCC complain as shown above. (in my case, >> powerpc gcc 2.5.2). Initializing i to NULL makes it clear to GCC and the >> casual code reviewer that i will not be dereferenced to a random >> address. >> >> Signed-off-by: Grant Likely >> Cc: Greg Kroah-Hartman >> --- >> Greg, some may argue that this is a tool problem, not a kernel problem, >> but it is useful to me. If anyone objects I'm not going to spend any >> time championing for this patch. > > Upgrade your tools to ones that work properly :) FWIW, it's still a toolchain that a lot of people use for embedded powerpc development. g. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/