netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, chas@cmf.nrl.navy.mil, jeff@garzik.org
Subject: Re: [patch 1/4] drivers/atm/firestream.c: suppress uninitialized var warning
Date: Fri, 28 Mar 2008 17:11:28 -0700	[thread overview]
Message-ID: <20080328171128.ff03ec02.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080328.165812.253071507.davem@davemloft.net>

On Fri, 28 Mar 2008 16:58:12 -0700 (PDT) David Miller <davem@davemloft.net> wrote:

> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Fri, 28 Mar 2008 16:54:37 -0700
> 
> > > diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
> > > index 47c57a4..98099f5 100644
> > > --- a/drivers/atm/firestream.c
> > > +++ b/drivers/atm/firestream.c
> > > @@ -978,6 +978,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
> > >  		/* Docs are vague about this atm_hdr field. By the way, the FS
> > >  		 * chip makes odd errors if lower bits are set.... -- REW */
> > >  		tc->atm_hdr =  (vpi << 20) | (vci << 4); 
> > > +		tmc0 = 0;
> > >  		{
> > >  			int pcr = atm_pcr_goal (txtp);
> > 
> > Whereas the reader doesn't know why that unneeded initialisation is there.
> 
> git show $(git blame drivers/atm/firestream.c | grep "tmc0 = 0" | \
> 	   awk ' { print $1 } ')

Not practical.  By this argument we wouldn't need code comments at all.

Plus the bit from my earlier email which you snipped.

Plus uninitialized_var() gives us something to grep for and experiment with
if/when future gcc's get smarter.

  reply	other threads:[~2008-03-29  0:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 21:37 [patch 1/4] drivers/atm/firestream.c: suppress uninitialized var warning akpm
2008-03-28 23:20 ` David Miller
2008-03-28 23:54   ` Andrew Morton
2008-03-28 23:58     ` David Miller
2008-03-29  0:11       ` Andrew Morton [this message]
2008-03-29  0:35         ` David Miller
2008-03-29  0:39           ` Andrew Morton
2008-03-31 15:57             ` Al Viro

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=20080328171128.ff03ec02.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=chas@cmf.nrl.navy.mil \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=netdev@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).