From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty/serial: Fix uninitialized variable warning
Date: Fri, 15 Mar 2013 13:30:10 -0700 [thread overview]
Message-ID: <20130315203010.GA25081@kroah.com> (raw)
In-Reply-To: <1362360907-4439-1-git-send-email-grant.likely@secretlab.ca>
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 <grant.likely@secretlab.ca>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> 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 :)
greg k-h
next prev parent reply other threads:[~2013-03-15 20:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 1:35 [PATCH] tty/serial: Fix uninitialized variable warning Grant Likely
2013-03-04 2:36 ` Peter Hurley
2013-03-04 9:41 ` Jiri Slaby
2013-03-15 20:30 ` Greg Kroah-Hartman [this message]
2013-03-15 21:24 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130315203010.GA25081@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.