From: Michael Ellerman <michael@ellerman.id.au>
To: Andy Gay <andy@andynet.net>
Cc: Thomas Klein <tklein@de.ibm.com>,
Jan-Bernd Themann <themann@de.ibm.com>,
netdev@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>,
Thomas Klein <osstklei@de.ibm.com>,
linux-ppc <linuxppc-dev@ozlabs.org>,
Christoph Raisch <raisch@de.ibm.com>,
Marcus Eder <meder@de.ibm.com>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [2.6.19 PATCH 4/7] ehea: ethtool interface
Date: Sat, 19 Aug 2006 18:41:27 +1000 [thread overview]
Message-ID: <1155976887.1388.17.camel@localhost.localdomain> (raw)
In-Reply-To: <1155970112.7302.434.camel@tahini.andynet.net>
[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]
On Sat, 2006-08-19 at 02:48 -0400, Andy Gay wrote:
> On Sat, 2006-08-19 at 16:18 +1000, Michael Ellerman wrote:
>
> >
> > If you try to return an uninitialized value the compiler will warn you,
> > you'll then look at the code and realise you missed a case, you might
> > save yourself a bug.
>
> You *should* look at the code :)
>
> So should we be reporting these as bugs?
No you're better off sending patches ;)
A lot of these have started appearing recently, which I think is due to
GCC becoming more vocal. Unfortunately many of them are false positives
caused by GCC not seeming to grok that this is ok:
void foo(int *x) { *x = 1; }
...
int x;
foo(&x);
return x;
It's a pity because it creates noise, but still it's beside the point.
New code going into the kernel should be 100% warning free, and so if
the eHEA guys had missed an error case they'd spot the warning before
they submitted it.
Doing the initialise-to-some-value "trick" means you only spot the bug
via testing.
cheers
--
Michael Ellerman
IBM OzLabs
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
next prev parent reply other threads:[~2006-08-19 8:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 11:33 [2.6.19 PATCH 4/7] ehea: ethtool interface Jan-Bernd Themann
2006-08-18 14:05 ` Alexey Dobriyan
2006-08-18 15:41 ` Thomas Klein
2006-08-18 17:45 ` Stephen Hemminger
2006-08-21 9:53 ` Thomas Klein
2006-08-19 6:18 ` Michael Ellerman
2006-08-19 6:48 ` Andy Gay
2006-08-19 8:41 ` Michael Ellerman [this message]
2006-08-19 13:47 ` Arnd Bergmann
2006-08-19 14:40 ` Jeff Garzik
2006-08-21 10:53 ` Thomas Klein
-- strict thread matches above, loose matches on Subject: below --
2006-08-22 12:54 Jan-Bernd Themann
2006-08-23 8:57 Jan-Bernd Themann
2006-09-04 10:40 Jan-Bernd Themann
2006-09-06 13:33 Jan-Bernd Themann
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=1155976887.1388.17.camel@localhost.localdomain \
--to=michael@ellerman.id.au \
--cc=adobriyan@gmail.com \
--cc=andy@andynet.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=meder@de.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=osstklei@de.ibm.com \
--cc=raisch@de.ibm.com \
--cc=themann@de.ibm.com \
--cc=tklein@de.ibm.com \
/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).