From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Soha Jin <soha@lohu.info>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Wende Tan <twd2.me@gmail.com>
Subject: Re: [PATCH v2] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
Date: Fri, 11 Nov 2022 09:52:12 +0100 [thread overview]
Message-ID: <Y24NPPF+6CM6b/d2@kroah.com> (raw)
In-Reply-To: <DS0PR05MB95440932459F31AA76618A75DA009@DS0PR05MB9544.namprd05.prod.outlook.com>
On Fri, Nov 11, 2022 at 08:30:46AM +0000, Soha Jin wrote:
> > -----Original Message-----
> > From: Soha Jin <soha@lohu.info>
> > Sent: Saturday, October 29, 2022 12:41 AM
> >
> > Not only platform devices described by OF have named interrupts, but
> > devices described by ACPI also have named interrupts. The fwnode is an
> > abstraction to different standards, and using fwnode_irq_get_byname can
> > support more devices.
> >
> > Moreover, when CONFIG_OF_IRQ is not enabled, there will be a stub method
> > always returning 0, the if statement can be removed safely.
> >
> > Signed-off-by: Soha Jin <soha@lohu.info>
> > Tested-by: Wende Tan <twd2.me@gmail.com>
> > ---
> > drivers/base/platform.c | 8 +++-----
> > 1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/base/platform.c b/drivers/base/platform.c index
> > 51bb2289865c..6cd7fd478c5f 100644
> > --- a/drivers/base/platform.c
> > +++ b/drivers/base/platform.c
> > @@ -441,11 +441,9 @@ static int __platform_get_irq_byname(struct
> > platform_device *dev,
> > struct resource *r;
> > int ret;
> >
> > - if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
> > - ret = of_irq_get_byname(dev->dev.of_node, name);
> > - if (ret > 0 || ret == -EPROBE_DEFER)
> > - return ret;
> > - }
> > + ret = fwnode_irq_get_byname(dev_fwnode(&dev->dev), name);
> > + if (ret > 0 || ret == -EPROBE_DEFER)
> > + return ret;
> >
> > r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name);
> > if (r) {
> > --
> > 2.30.2
> >
>
> Hello Greg,
>
> I noticed the original patch is merged into -next branch, but as I said in
> the mail yesterday (maybe you did not see it), I already composed a v2
> patch 2 weeks ago. Except the formatting fix, this patch also removed a
> useless if-branch.
>
> Are there any chance to correct this mistake?
Please submit a fixup patch, sorry, I can't rebase that branch now.
greg k-h
next prev parent reply other threads:[~2022-11-11 8:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 16:41 [PATCH v2] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq Soha Jin
2022-11-11 8:30 ` Soha Jin
2022-11-11 8:52 ` Greg Kroah-Hartman [this message]
2022-11-11 9:42 ` Soha Jin
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=Y24NPPF+6CM6b/d2@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=soha@lohu.info \
--cc=twd2.me@gmail.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