From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Jochen Friedrich <jochen@scram.de>
Cc: khali@linux-fr.org, i2c@lm-sensors.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] of/i2c: don't pass -1 to irq_dispose_mapping, otherwise kernel will oops
Date: Fri, 11 Jul 2008 23:15:02 +0400 [thread overview]
Message-ID: <20080711191502.GA21847@polina.dev.rtsoft.ru> (raw)
In-Reply-To: <4877ADF6.8070702@scram.de>
On Fri, Jul 11, 2008 at 09:01:10PM +0200, Jochen Friedrich wrote:
> Hi Grant,
>
> > What is the reason that info.irq is set to -1 in the first place? This
> > looks like another bug to me. Does something in the i2c layer depend on
> > the -1 value?
>
> Nope, it was a bug in the i2c documentation fixed recently:
Nope? I'm looking into i2c-core.c:
.. i2c_new_device(...)
{
client->irq = info->irq;
Core will blindly pass irq, so clients should ensure that irq contains
correct value. And as far as there is no common scheme of checking that
"there is no irq specified", the most safe option is -1.
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8e29da9ee8958cc17e27f4053420f1c982614793
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2008-07-11 19:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080711174859.GA24260@polina.dev.rtsoft.ru>
2008-07-11 18:23 ` [PATCH] of/i2c: don't pass -1 to irq_dispose_mapping, otherwise kernel will oops Grant Likely
2008-07-11 18:55 ` Anton Vorontsov
[not found] ` <20080711182323.GB15321-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
2008-07-11 19:01 ` Jochen Friedrich
2008-07-11 19:15 ` Anton Vorontsov [this message]
[not found] ` <20080711191502.GA21847-PHTr8nzUCjejyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2008-07-12 8:22 ` Wolfram Sang
2008-07-12 8:00 ` [i2c] " Wolfram Sang
2008-07-13 3:59 ` Jon Smirl
[not found] ` <20080712080004.GA16739-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-07-16 22:20 ` Grant Likely
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=20080711191502.GA21847@polina.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=i2c@lm-sensors.org \
--cc=jochen@scram.de \
--cc=khali@linux-fr.org \
--cc=linuxppc-dev@ozlabs.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