All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq: Don't return error on missing optional irq_request_resources()
@ 2022-05-12 16:05 Antonio Borneo
  2022-07-04 12:53 ` Antonio Borneo
  2022-07-07  8:15 ` [irqchip: irq/irqchip-next] " irqchip-bot for Antonio Borneo
  0 siblings, 2 replies; 3+ messages in thread
From: Antonio Borneo @ 2022-05-12 16:05 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, linux-kernel; +Cc: Antonio Borneo, linux-stm32

Function irq_chip::irq_request_resources() is reported as optional
in the declaration of struct irq_chip.
If the parent irq_chip does not implement it, we should ignore it
and return.

Don't return error if the functions is missing.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
---

As follow-up of discussion in
https://lore.kernel.org/lkml/875ymd6xdu.wl-maz@kernel.org/
here is a proposal for changing the returned value.

A similar issue is present for the optional function
irq_set_vcpu_affinity(), to be covered separately, if needed.

---
 kernel/irq/chip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 54af0deb239b..eb921485930f 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1513,7 +1513,8 @@ int irq_chip_request_resources_parent(struct irq_data *data)
 	if (data->chip->irq_request_resources)
 		return data->chip->irq_request_resources(data);
 
-	return -ENOSYS;
+	/* no error on missing optional irq_chip::irq_request_resources */
+	return 0;
 }
 EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent);
 

base-commit: c5eb0a61238dd6faf37f58c9ce61c9980aaffd7a
-- 
2.36.0


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

* Re: [PATCH] genirq: Don't return error on missing optional irq_request_resources()
  2022-05-12 16:05 [PATCH] genirq: Don't return error on missing optional irq_request_resources() Antonio Borneo
@ 2022-07-04 12:53 ` Antonio Borneo
  2022-07-07  8:15 ` [irqchip: irq/irqchip-next] " irqchip-bot for Antonio Borneo
  1 sibling, 0 replies; 3+ messages in thread
From: Antonio Borneo @ 2022-07-04 12:53 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, linux-kernel; +Cc: linux-stm32

On Thu, 2022-05-12 at 18:05 +0200, Antonio Borneo wrote:
> Function irq_chip::irq_request_resources() is reported as optional
> in the declaration of struct irq_chip.
> If the parent irq_chip does not implement it, we should ignore it
> and return.
> 
> Don't return error if the functions is missing.
> 
> Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
> ---
> 
> As follow-up of discussion in
> https://lore.kernel.org/lkml/875ymd6xdu.wl-maz@kernel.org/
> here is a proposal for changing the returned value.
> 
> A similar issue is present for the optional function
> irq_set_vcpu_affinity(), to be covered separately, if needed.

Gentle ping for this patch.
Does it match the expected behaviour for an optional function?

Thanks,
Antonio


> 
> ---
>  kernel/irq/chip.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
> index 54af0deb239b..eb921485930f 100644
> --- a/kernel/irq/chip.c
> +++ b/kernel/irq/chip.c
> @@ -1513,7 +1513,8 @@ int irq_chip_request_resources_parent(struct
> irq_data *data)
>         if (data->chip->irq_request_resources)
>                 return data->chip->irq_request_resources(data);
>  
> -       return -ENOSYS;
> +       /* no error on missing optional
> irq_chip::irq_request_resources */
> +       return 0;
>  }
>  EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent);
>  
> 
> base-commit: c5eb0a61238dd6faf37f58c9ce61c9980aaffd7a


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

* [irqchip: irq/irqchip-next] genirq: Don't return error on missing optional irq_request_resources()
  2022-05-12 16:05 [PATCH] genirq: Don't return error on missing optional irq_request_resources() Antonio Borneo
  2022-07-04 12:53 ` Antonio Borneo
@ 2022-07-07  8:15 ` irqchip-bot for Antonio Borneo
  1 sibling, 0 replies; 3+ messages in thread
From: irqchip-bot for Antonio Borneo @ 2022-07-07  8:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Antonio Borneo, Marc Zyngier, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     95001b756467ecc9f5973eb5e74e97699d9bbdf1
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/95001b756467ecc9f5973eb5e74e97699d9bbdf1
Author:        Antonio Borneo <antonio.borneo@foss.st.com>
AuthorDate:    Thu, 12 May 2022 18:05:44 +02:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 07 Jul 2022 09:04:13 +01:00

genirq: Don't return error on missing optional irq_request_resources()

Function irq_chip::irq_request_resources() is reported as optional
in the declaration of struct irq_chip.
If the parent irq_chip does not implement it, we should ignore it
and return.

Don't return error if the functions is missing.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220512160544.13561-1-antonio.borneo@foss.st.com
---
 kernel/irq/chip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 886789d..c190405 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1516,7 +1516,8 @@ int irq_chip_request_resources_parent(struct irq_data *data)
 	if (data->chip->irq_request_resources)
 		return data->chip->irq_request_resources(data);
 
-	return -ENOSYS;
+	/* no error on missing optional irq_chip::irq_request_resources */
+	return 0;
 }
 EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent);
 

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

end of thread, other threads:[~2022-07-07  8:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 16:05 [PATCH] genirq: Don't return error on missing optional irq_request_resources() Antonio Borneo
2022-07-04 12:53 ` Antonio Borneo
2022-07-07  8:15 ` [irqchip: irq/irqchip-next] " irqchip-bot for Antonio Borneo

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.