From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] Removes warning related to use of uninitialized variable
Date: Thu, 13 Jan 2011 08:21:28 +0000 [thread overview]
Message-ID: <4D2EB608.7020107@bfs.de> (raw)
In-Reply-To: <AANLkTi=h20J0XhFp2=iGH0WF-uZmWS0cv4018X=h5YBn@mail.gmail.com>
Am 13.01.2011 07:49, schrieb Sukanto Ghosh:
> The warning is given by GCC 4.2.2 (provided with eldk cross-compiler
> 4.2 for ppc_4xx)
> Resending the patch with uninitialized_var()
>
> Signed-off-by: Sukanto Ghosh <sukanto.cse.iitb@gmail.com>
> --
>
>
> diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
> index b25e6e4..05c0ba3 100644
> --- a/drivers/serial/8250.c
> +++ b/drivers/serial/8250.c
> @@ -1724,7 +1724,7 @@ static int serial_link_irq_chain(struct
> uart_8250_port *up)
>
> static void serial_unlink_irq_chain(struct uart_8250_port *up)
> {
> - struct irq_info *i;
> + struct irq_info *uninitialized_var(i);
> struct hlist_node *n;
> struct hlist_head *h;
I have a minor issue with the variable naming, IMHO it violates
the rule of "least surprise", short names are normaly used for
integer loops like for(i=0;i<10,i++). Perhaps some kind soul
can change that into something more readable >(eg. info, node,head).
note: this comment is not directly related to the patch, just
my 2 cents
re,
wh
next prev parent reply other threads:[~2011-01-13 8:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 2:26 [PATCH] Removes warning related to use of uninitialized variable i Sukanto Ghosh
2011-01-13 3:05 ` [PATCH] Removes warning related to use of uninitialized Greg KH
2011-01-13 4:05 ` [PATCH] Removes warning related to use of uninitialized variable i Sukanto Ghosh
2011-01-13 5:22 ` [PATCH] Removes warning related to use of uninitialized Dan Carpenter
2011-01-13 6:49 ` [PATCH] Removes warning related to use of uninitialized variable i Sukanto Ghosh
2011-01-13 8:21 ` walter harms [this message]
2011-01-13 18:29 ` [PATCH] Removes warning related to use of uninitialized Greg KH
2011-01-13 19:38 ` [PATCH] Removes warning related to use of uninitialized variable i Sukanto Ghosh
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=4D2EB608.7020107@bfs.de \
--to=wharms@bfs.de \
--cc=kernel-janitors@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 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).