* [PATCH -next 0/2] soc: Do not check for 0 return after calling platform_get_irq()
@ 2023-08-03 10:48 Ruan Jinjie
2023-08-03 10:48 ` [PATCH -next 1/2] soc: fsl: qe: " Ruan Jinjie
2023-08-03 10:48 ` [PATCH -next 2/2] soc: xilinx: " Ruan Jinjie
0 siblings, 2 replies; 4+ messages in thread
From: Ruan Jinjie @ 2023-08-03 10:48 UTC (permalink / raw)
To: linuxppc-dev, linux-arm-kernel, qiang.zhao, leoyang.li,
michal.simek, robh
Cc: ruanjinjie
Since commit ce753ad1549c ("platform: finally disallow IRQ0 in
platform_get_irq() and its ilk"), there is no possible for
platform_get_irq() to return 0.
And the return value of platform_get_irq() is
more sensible to show the error reason.
Ruan Jinjie (2):
soc: fsl: qe: Do not check for 0 return after calling
platform_get_irq()
soc: xilinx: Do not check for 0 return after calling
platform_get_irq()
drivers/soc/fsl/qe/qe_ic.c | 4 ++--
drivers/soc/xilinx/zynqmp_power.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH -next 1/2] soc: fsl: qe: Do not check for 0 return after calling platform_get_irq()
2023-08-03 10:48 [PATCH -next 0/2] soc: Do not check for 0 return after calling platform_get_irq() Ruan Jinjie
@ 2023-08-03 10:48 ` Ruan Jinjie
2023-08-03 10:48 ` [PATCH -next 2/2] soc: xilinx: " Ruan Jinjie
1 sibling, 0 replies; 4+ messages in thread
From: Ruan Jinjie @ 2023-08-03 10:48 UTC (permalink / raw)
To: linuxppc-dev, linux-arm-kernel, qiang.zhao, leoyang.li,
michal.simek, robh
Cc: ruanjinjie
There is no possible for platform_get_irq() to
return 0. Use the return value from platform_get_irq().
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
drivers/soc/fsl/qe/qe_ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c
index bbae3d39c7be..8ab6e51e4f28 100644
--- a/drivers/soc/fsl/qe/qe_ic.c
+++ b/drivers/soc/fsl/qe/qe_ic.c
@@ -435,8 +435,8 @@ static int qe_ic_init(struct platform_device *pdev)
qe_ic->virq_high = platform_get_irq(pdev, 0);
qe_ic->virq_low = platform_get_irq(pdev, 1);
- if (qe_ic->virq_low <= 0)
- return -ENODEV;
+ if (qe_ic->virq_low < 0)
+ return qe_ic->virq_low;
if (qe_ic->virq_high > 0 && qe_ic->virq_high != qe_ic->virq_low) {
low_handler = qe_ic_cascade_low;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next 2/2] soc: xilinx: Do not check for 0 return after calling platform_get_irq()
2023-08-03 10:48 [PATCH -next 0/2] soc: Do not check for 0 return after calling platform_get_irq() Ruan Jinjie
2023-08-03 10:48 ` [PATCH -next 1/2] soc: fsl: qe: " Ruan Jinjie
@ 2023-08-03 10:48 ` Ruan Jinjie
2023-08-04 6:53 ` Michal Simek
1 sibling, 1 reply; 4+ messages in thread
From: Ruan Jinjie @ 2023-08-03 10:48 UTC (permalink / raw)
To: linuxppc-dev, linux-arm-kernel, qiang.zhao, leoyang.li,
michal.simek, robh
Cc: ruanjinjie
There is no possible for platform_get_irq() to
return 0. Use the return value from platform_get_irq().
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
drivers/soc/xilinx/zynqmp_power.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
index 641dcc958911..eddfc8141a42 100644
--- a/drivers/soc/xilinx/zynqmp_power.c
+++ b/drivers/soc/xilinx/zynqmp_power.c
@@ -242,8 +242,8 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
}
} else if (of_property_present(pdev->dev.of_node, "interrupts")) {
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return -ENXIO;
+ if (irq < 0)
+ return irq;
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
zynqmp_pm_isr,
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next 2/2] soc: xilinx: Do not check for 0 return after calling platform_get_irq()
2023-08-03 10:48 ` [PATCH -next 2/2] soc: xilinx: " Ruan Jinjie
@ 2023-08-04 6:53 ` Michal Simek
0 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2023-08-04 6:53 UTC (permalink / raw)
To: Ruan Jinjie, linuxppc-dev, linux-arm-kernel, qiang.zhao,
leoyang.li, robh
On 8/3/23 12:48, Ruan Jinjie wrote:
> There is no possible for platform_get_irq() to
> return 0. Use the return value from platform_get_irq().
>
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
> drivers/soc/xilinx/zynqmp_power.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
> index 641dcc958911..eddfc8141a42 100644
> --- a/drivers/soc/xilinx/zynqmp_power.c
> +++ b/drivers/soc/xilinx/zynqmp_power.c
> @@ -242,8 +242,8 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
> }
> } else if (of_property_present(pdev->dev.of_node, "interrupts")) {
> irq = platform_get_irq(pdev, 0);
> - if (irq <= 0)
> - return -ENXIO;
> + if (irq < 0)
> + return irq;
>
> ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
> zynqmp_pm_isr,
Applied this 2/2 patch.
Thanks,
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-04 8:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-03 10:48 [PATCH -next 0/2] soc: Do not check for 0 return after calling platform_get_irq() Ruan Jinjie
2023-08-03 10:48 ` [PATCH -next 1/2] soc: fsl: qe: " Ruan Jinjie
2023-08-03 10:48 ` [PATCH -next 2/2] soc: xilinx: " Ruan Jinjie
2023-08-04 6:53 ` Michal Simek
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).