All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
@ 2022-09-30 18:15 soha
  2022-10-10  3:14 ` PING: " Soha Jin
  2022-11-10 17:55 ` Greg KH
  0 siblings, 2 replies; 7+ messages in thread
From: soha @ 2022-09-30 18:15 UTC (permalink / raw)
  To: gregkh; +Cc: rafael, linux-kernel, 'Wende Tan'

From 02df97f4d814b9893eef2c2118b85d2b4b9d61ae Mon Sep 17 00:00:00 2001
From: Soha Jin <soha@lohu.info>
Date: Sat, 1 Oct 2022 00:26:04 +0800
Subject: [PATCH] platform: use fwnode_irq_get_byname instead of
 of_irq_get_byname to get irq

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.

Signed-off-by: Soha Jin <soha@lohu.info>
Tested-by: Wende Tan <twd2.me@gmail.com>
---
 drivers/base/platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 51bb22898..968f3d71e 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -441,8 +441,8 @@ 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 (!dev->dev.of_node || IS_ENABLED(CONFIG_OF_IRQ)) {
+		ret = fwnode_irq_get_byname(dev_fwnode(&dev->dev), name);
 		if (ret > 0 || ret == -EPROBE_DEFER)
 			return ret;
 	}
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* PING: [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
  2022-09-30 18:15 [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq soha
@ 2022-10-10  3:14 ` Soha Jin
  2022-10-10  6:21   ` Greg KH
  2022-11-10 17:55 ` Greg KH
  1 sibling, 1 reply; 7+ messages in thread
From: Soha Jin @ 2022-10-10  3:14 UTC (permalink / raw)
  To: gregkh; +Cc: rafael, linux-kernel, 'Wende Tan'

> -----Original Message-----
> From: soha@lohu.info <soha@lohu.info>
> Sent: Saturday, October 1, 2022 2:15 AM
> To: gregkh@linuxfoundation.org
> Cc: rafael@kernel.org; linux-kernel@vger.kernel.org; 'Wende Tan'
> <twd2.me@gmail.com>
> Subject: [PATCH] platform: use fwnode_irq_get_byname instead of
> of_irq_get_byname to get irq
> 
> >From 02df97f4d814b9893eef2c2118b85d2b4b9d61ae Mon Sep 17
> 00:00:00 2001
> From: Soha Jin <soha@lohu.info>
> Date: Sat, 1 Oct 2022 00:26:04 +0800
> Subject: [PATCH] platform: use fwnode_irq_get_byname instead of
> of_irq_get_byname to get irq
> 
> 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.
> 
> Signed-off-by: Soha Jin <soha@lohu.info>
> Tested-by: Wende Tan <twd2.me@gmail.com>
> ---
>  drivers/base/platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c index
> 51bb22898..968f3d71e 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -441,8 +441,8 @@ 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 (!dev->dev.of_node || IS_ENABLED(CONFIG_OF_IRQ)) {
> +		ret = fwnode_irq_get_byname(dev_fwnode(&dev->dev), name);
>  		if (ret > 0 || ret == -EPROBE_DEFER)
>  			return ret;
>  	}
> --
> 2.30.2
> 
> 

Any updates on this 10-day-ago patch?

Regards,
Soha


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PING: [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
  2022-10-10  3:14 ` PING: " Soha Jin
@ 2022-10-10  6:21   ` Greg KH
  2022-10-10  7:07     ` Soha Jin
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2022-10-10  6:21 UTC (permalink / raw)
  To: Soha Jin; +Cc: rafael, linux-kernel, 'Wende Tan'

On Mon, Oct 10, 2022 at 11:14:46AM +0800, Soha Jin wrote:
> > -----Original Message-----
> > From: soha@lohu.info <soha@lohu.info>
> > Sent: Saturday, October 1, 2022 2:15 AM
> > To: gregkh@linuxfoundation.org
> > Cc: rafael@kernel.org; linux-kernel@vger.kernel.org; 'Wende Tan'
> > <twd2.me@gmail.com>
> > Subject: [PATCH] platform: use fwnode_irq_get_byname instead of
> > of_irq_get_byname to get irq
> > 
> > >From 02df97f4d814b9893eef2c2118b85d2b4b9d61ae Mon Sep 17
> > 00:00:00 2001
> > From: Soha Jin <soha@lohu.info>
> > Date: Sat, 1 Oct 2022 00:26:04 +0800
> > Subject: [PATCH] platform: use fwnode_irq_get_byname instead of
> > of_irq_get_byname to get irq
> > 
> > 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.
> > 
> > Signed-off-by: Soha Jin <soha@lohu.info>
> > Tested-by: Wende Tan <twd2.me@gmail.com>
> > ---
> >  drivers/base/platform.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/base/platform.c b/drivers/base/platform.c index
> > 51bb22898..968f3d71e 100644
> > --- a/drivers/base/platform.c
> > +++ b/drivers/base/platform.c
> > @@ -441,8 +441,8 @@ 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 (!dev->dev.of_node || IS_ENABLED(CONFIG_OF_IRQ)) {
> > +		ret = fwnode_irq_get_byname(dev_fwnode(&dev->dev), name);
> >  		if (ret > 0 || ret == -EPROBE_DEFER)
> >  			return ret;
> >  	}
> > --
> > 2.30.2
> > 
> > 
> 
> Any updates on this 10-day-ago patch?

It's the middle of the merge window, we can't do anything until after
6.1-rc1 is out, please relax and wait for that.

And what is the rush here, what is broken without this change?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: PING: [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
  2022-10-10  6:21   ` Greg KH
@ 2022-10-10  7:07     ` Soha Jin
  2022-11-10 17:55       ` 'Greg KH'
  0 siblings, 1 reply; 7+ messages in thread
From: Soha Jin @ 2022-10-10  7:07 UTC (permalink / raw)
  To: 'Greg KH'; +Cc: rafael, linux-kernel, 'Wende Tan'

> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Monday, October 10, 2022 2:22 PM
> 
> It's the middle of the merge window, we can't do anything until after
> 6.1-rc1 is out, please relax and wait for that.
> 
> And what is the rush here, what is broken without this change?
> 

Got it, just wondering if there anything I could improve in this patch,
since I have not got any feedback. The bug just affect named interrupts in
ACPI, which seems not used widely and not in a hurry.

Regards,
Soha


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
  2022-09-30 18:15 [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq soha
  2022-10-10  3:14 ` PING: " Soha Jin
@ 2022-11-10 17:55 ` Greg KH
  1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2022-11-10 17:55 UTC (permalink / raw)
  To: soha; +Cc: rafael, linux-kernel, 'Wende Tan'

On Sat, Oct 01, 2022 at 02:15:29AM +0800, soha@lohu.info wrote:
> >From 02df97f4d814b9893eef2c2118b85d2b4b9d61ae Mon Sep 17 00:00:00 2001
> From: Soha Jin <soha@lohu.info>
> Date: Sat, 1 Oct 2022 00:26:04 +0800
> Subject: [PATCH] platform: use fwnode_irq_get_byname instead of
>  of_irq_get_byname to get irq
> 
> 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.
> 
> Signed-off-by: Soha Jin <soha@lohu.info>
> Tested-by: Wende Tan <twd2.me@gmail.com>
> ---
>  drivers/base/platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 51bb22898..968f3d71e 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -441,8 +441,8 @@ 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 (!dev->dev.of_node || IS_ENABLED(CONFIG_OF_IRQ)) {
> +		ret = fwnode_irq_get_byname(dev_fwnode(&dev->dev), name);
>  		if (ret > 0 || ret == -EPROBE_DEFER)
>  			return ret;
>  	}
> -- 
> 2.30.2
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
  and can not be applied.  Please read the file,
  Documentation/email-clients.txt in order to fix this.

- Your patch was attached, please place it inline so that it can be
  applied directly from the email message itself.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PING: [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
  2022-10-10  7:07     ` Soha Jin
@ 2022-11-10 17:55       ` 'Greg KH'
  2022-11-10 18:01         ` Soha Jin
  0 siblings, 1 reply; 7+ messages in thread
From: 'Greg KH' @ 2022-11-10 17:55 UTC (permalink / raw)
  To: Soha Jin; +Cc: rafael, linux-kernel, 'Wende Tan'

On Mon, Oct 10, 2022 at 03:07:19PM +0800, Soha Jin wrote:
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Monday, October 10, 2022 2:22 PM
> > 
> > It's the middle of the merge window, we can't do anything until after
> > 6.1-rc1 is out, please relax and wait for that.
> > 
> > And what is the rush here, what is broken without this change?
> > 
> 
> Got it, just wondering if there anything I could improve in this patch,
> since I have not got any feedback. The bug just affect named interrupts in
> ACPI, which seems not used widely and not in a hurry.

Your patch is corrupted and can not be applied :(
You could have tested this by picking it up from lore.kernel.org and
verified that it worked.

Please fix your email client and send a new version.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: PING: [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq
  2022-11-10 17:55       ` 'Greg KH'
@ 2022-11-10 18:01         ` Soha Jin
  0 siblings, 0 replies; 7+ messages in thread
From: Soha Jin @ 2022-11-10 18:01 UTC (permalink / raw)
  To: 'Greg KH'; +Cc: rafael, linux-kernel, 'Wende Tan'

Hello Greg,

> -----Original Message-----
> From: 'Greg KH' <gregkh@linuxfoundation.org>
> Sent: Friday, November 11, 2022 1:56 AM
> 
> Your patch is corrupted and can not be applied :( You could have tested this
> by picking it up from lore.kernel.org and verified that it worked.
> 
> Please fix your email client and send a new version.
> 
> thanks,
> 
> greg k-h

I sent a PATCH v2* several days before. This patch's format should be
good and I removed a meaningless if-branch.

Regards,
Soha

* https://lore.kernel.org/all/20221028164120.2798-1-soha@lohu.info/


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-10 18:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 18:15 [PATCH] platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq soha
2022-10-10  3:14 ` PING: " Soha Jin
2022-10-10  6:21   ` Greg KH
2022-10-10  7:07     ` Soha Jin
2022-11-10 17:55       ` 'Greg KH'
2022-11-10 18:01         ` Soha Jin
2022-11-10 17:55 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.