From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: linuxppc-dev@ozlabs.org, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] the wrong variable checked after request_irq()
Date: Mon, 16 Jul 2007 08:07:49 +1000 [thread overview]
Message-ID: <1184537269.25235.28.camel@localhost.localdomain> (raw)
In-Reply-To: <20070715220216.GF21668@ftp.linux.org.uk>
On Sun, 2007-07-15 at 23:02 +0100, Al Viro wrote:
> On Mon, Jul 16, 2007 at 07:40:38AM +1000, Benjamin Herrenschmidt wrote:
> > On Sun, 2007-07-15 at 20:59 +0100, Al Viro wrote:
> > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> >
> > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >
> > Out of curiosity, how did you pick it up ? You have some automated tool
> > to catch that (or sparse changes) or you just did -lots- of code
> > inspection ?
>
> While testing sparse changes, actually (comparing pointers to null
> pointer constant spelled without a cast to void *)... That gave several
> hundred hits, most of them being immediately obvious (picking the lines
> by file and line number and looking through the list had eliminated all
> but about a dozen or two). Several were not...
Ok. In fact, it would have been nice if gcc had been able to pick it up
for another reason. The old code is:
if (cascade == NULL)
return;
cascade_irq = irq_of_parse_and_map(cascade, 0);
if (cascade == NO_IRQ) {
printk(KERN_ERR "mpic: failed to map cascade interrupt");
return;
}
And NO_IRQ is 0 on powerpc nowadays. Thus the test can never be true :-)
But it looks like gcc doesn't pick that up.
Ben.
prev parent reply other threads:[~2007-07-15 22:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-15 19:59 [PATCH] the wrong variable checked after request_irq() Al Viro
2007-07-15 21:40 ` Benjamin Herrenschmidt
2007-07-15 22:02 ` Al Viro
2007-07-15 22:07 ` Benjamin Herrenschmidt [this message]
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=1184537269.25235.28.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@ftp.linux.org.uk \
/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).