* [PATCH 1/2] irqchip/ti-sci: Simplify with dev_err_probe()
@ 2020-09-02 17:46 Krzysztof Kozlowski
2020-09-02 17:46 ` [PATCH 2/2] irqchip/ti-sci-inta: Fix kerneldoc Krzysztof Kozlowski
2020-09-13 17:05 ` [PATCH 1/2] irqchip/ti-sci: Simplify with dev_err_probe() Marc Zyngier
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 17:46 UTC (permalink / raw)
To: Nishanth Menon, Tero Kristo, Santosh Shilimkar, Thomas Gleixner,
Jason Cooper, Marc Zyngier, linux-arm-kernel, linux-kernel
Cc: Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.
There is also no need to assign NULL to 'intr->sci' as it is part of
devm-allocated memory.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/irqchip/irq-ti-sci-inta.c | 10 +++-------
drivers/irqchip/irq-ti-sci-intr.c | 10 +++-------
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/drivers/irqchip/irq-ti-sci-inta.c b/drivers/irqchip/irq-ti-sci-inta.c
index d4e97605456b..bc863ef7998d 100644
--- a/drivers/irqchip/irq-ti-sci-inta.c
+++ b/drivers/irqchip/irq-ti-sci-inta.c
@@ -600,13 +600,9 @@ static int ti_sci_inta_irq_domain_probe(struct platform_device *pdev)
inta->pdev = pdev;
inta->sci = devm_ti_sci_get_by_phandle(dev, "ti,sci");
- if (IS_ERR(inta->sci)) {
- ret = PTR_ERR(inta->sci);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "ti,sci read fail %d\n", ret);
- inta->sci = NULL;
- return ret;
- }
+ if (IS_ERR(inta->sci))
+ return dev_err_probe(dev, PTR_ERR(inta->sci),
+ "ti,sci read fail\n");
ret = of_property_read_u32(dev->of_node, "ti,sci-dev-id", &inta->ti_sci_id);
if (ret) {
diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c
index cbc1758228d9..6a6fb6616c21 100644
--- a/drivers/irqchip/irq-ti-sci-intr.c
+++ b/drivers/irqchip/irq-ti-sci-intr.c
@@ -254,13 +254,9 @@ static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev)
}
intr->sci = devm_ti_sci_get_by_phandle(dev, "ti,sci");
- if (IS_ERR(intr->sci)) {
- ret = PTR_ERR(intr->sci);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "ti,sci read fail %d\n", ret);
- intr->sci = NULL;
- return ret;
- }
+ if (IS_ERR(intr->sci))
+ return dev_err_probe(dev, PTR_ERR(intr->sci),
+ "ti,sci read fail\n");
ret = of_property_read_u32(dev_of_node(dev), "ti,sci-dev-id",
&intr->ti_sci_id);
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] irqchip/ti-sci-inta: Fix kerneldoc
2020-09-02 17:46 [PATCH 1/2] irqchip/ti-sci: Simplify with dev_err_probe() Krzysztof Kozlowski
@ 2020-09-02 17:46 ` Krzysztof Kozlowski
2020-09-13 15:34 ` Marc Zyngier
2020-09-13 17:05 ` [PATCH 1/2] irqchip/ti-sci: Simplify with dev_err_probe() Marc Zyngier
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 17:46 UTC (permalink / raw)
To: Nishanth Menon, Tero Kristo, Santosh Shilimkar, Thomas Gleixner,
Jason Cooper, Marc Zyngier, linux-arm-kernel, linux-kernel
Cc: Krzysztof Kozlowski
Fix kerneldoc W=1 warnings:
drivers/irqchip/irq-ti-sci-inta.c:144: warning: Function parameter or member 'vint_id' not described in 'ti_sci_inta_xlate_irq'
drivers/irqchip/irq-ti-sci-inta.c:144: warning: Excess function parameter 'irq' description in 'ti_sci_inta_xlate_irq'
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/irqchip/irq-ti-sci-inta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-ti-sci-inta.c b/drivers/irqchip/irq-ti-sci-inta.c
index bc863ef7998d..84929f3e2003 100644
--- a/drivers/irqchip/irq-ti-sci-inta.c
+++ b/drivers/irqchip/irq-ti-sci-inta.c
@@ -134,7 +134,7 @@ static void ti_sci_inta_irq_handler(struct irq_desc *desc)
/**
* ti_sci_inta_xlate_irq() - Translate hwirq to parent's hwirq.
* @inta: IRQ domain corresponding to Interrupt Aggregator
- * @irq: Hardware irq corresponding to the above irq domain
+ * @vint_id: TISCI vint ID
*
* Return parent irq number if translation is available else -ENOENT.
*/
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] irqchip/ti-sci-inta: Fix kerneldoc
2020-09-02 17:46 ` [PATCH 2/2] irqchip/ti-sci-inta: Fix kerneldoc Krzysztof Kozlowski
@ 2020-09-13 15:34 ` Marc Zyngier
0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2020-09-13 15:34 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Nishanth Menon, Jason Cooper, linux-kernel, Tero Kristo,
Santosh Shilimkar, Thomas Gleixner, linux-arm-kernel
On Wed, 02 Sep 2020 18:46:15 +0100,
Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Fix kerneldoc W=1 warnings:
>
> drivers/irqchip/irq-ti-sci-inta.c:144: warning: Function parameter or member 'vint_id' not described in 'ti_sci_inta_xlate_irq'
> drivers/irqchip/irq-ti-sci-inta.c:144: warning: Excess function parameter 'irq' description in 'ti_sci_inta_xlate_irq'
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> drivers/irqchip/irq-ti-sci-inta.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-ti-sci-inta.c b/drivers/irqchip/irq-ti-sci-inta.c
> index bc863ef7998d..84929f3e2003 100644
> --- a/drivers/irqchip/irq-ti-sci-inta.c
> +++ b/drivers/irqchip/irq-ti-sci-inta.c
> @@ -134,7 +134,7 @@ static void ti_sci_inta_irq_handler(struct irq_desc *desc)
> /**
> * ti_sci_inta_xlate_irq() - Translate hwirq to parent's hwirq.
> * @inta: IRQ domain corresponding to Interrupt Aggregator
> - * @irq: Hardware irq corresponding to the above irq domain
> + * @vint_id: TISCI vint ID
I'm not sure that replacing a flaky variable name with something that
is essentially unintelligible is a huge improvement.
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] irqchip/ti-sci: Simplify with dev_err_probe()
2020-09-02 17:46 [PATCH 1/2] irqchip/ti-sci: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-09-02 17:46 ` [PATCH 2/2] irqchip/ti-sci-inta: Fix kerneldoc Krzysztof Kozlowski
@ 2020-09-13 17:05 ` Marc Zyngier
1 sibling, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2020-09-13 17:05 UTC (permalink / raw)
To: kvmarm, Alexandru Elisei, linux-kernel, linux-arm-kernel,
Nishanth Menon, Santosh Shilimkar, Krzysztof Kozlowski,
Jason Cooper, Thomas Gleixner, Tero Kristo
Cc: catalin.marinas, will
On Wed, 2 Sep 2020 19:46:14 +0200, Krzysztof Kozlowski wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe(). Less code and the error value gets printed.
>
> There is also no need to assign NULL to 'intr->sci' as it is part of
> devm-allocated memory.
Applied to irq/irqchip-next, thanks!
[1/2] irqchip/ti-sci: Simplify with dev_err_probe()
commit: ea6c25e6057c0b7c18337696be84b8f9751f19ec
Patch #2 didn't make a lot of sense, so not applied.
Cheers,
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-13 17:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02 17:46 [PATCH 1/2] irqchip/ti-sci: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-09-02 17:46 ` [PATCH 2/2] irqchip/ti-sci-inta: Fix kerneldoc Krzysztof Kozlowski
2020-09-13 15:34 ` Marc Zyngier
2020-09-13 17:05 ` [PATCH 1/2] irqchip/ti-sci: Simplify with dev_err_probe() Marc Zyngier
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).