[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120507083602.GA4415@opensource.wolfsonmicro.com>
Date: Mon, 7 May 2012 09:36:03 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Guenter Roeck <guenter.roeck@...csson.com>
Cc: Joe Perches <joe@...ches.com>,
Mauro Carvalho Chehab <mchehab@...radead.org>,
"James E.J. Bottomley" <JBottomley@...allels.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jarod Wilson <jarod@...hat.com>
Subject: Re: drivers: Probable misuses of ||
On Sat, May 05, 2012 at 09:00:42AM -0700, Guenter Roeck wrote:
> On Fri, May 04, 2012 at 06:13:33PM -0400, Mark Brown wrote:
> > Right, but you need to look at the code and explain why this is a
> > problem. For example, the case I've left quoted above reads to me like
> > the intention is "If the chip isn't one I know doesn't like this then
> > let's do it" which is a perfectly sensible thing to write.
> I can not really follow your logic here; it is difficult for me to imagine a situation
> where anything along the line of
> if (val != 1 || val != 2)
> would provide value other than creating confusion. Maybe you can explain that a bit further.
Yeah, I hadn't actually read the code closely enough but it's not my
main point anyway - the main point was that the reports were very easy
to ignore because they're just a paste in of the error message with no
analysis they were very likely to just get ignored unless someone has a
particular interest in the code (which is essentially what I did - I
glanced at the report but only very briefly).
Compare this with the reports from people like Julia Lawall, for example
- they tend to be very clear. Even simply adding "...as with || they
will always be true" would've helped.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists