Re: [PATCH 1/2] thermal/drivers/rcar_gen3: Handle -ENXIO from optional IRQ lookup
Geert Uytterhoeven <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <CAMuHMdWJ3W2JKmxaKaa-A-Zk633cf4UwbESi+F1_h4tX1AhRng@mail.gmail.com> |
Hi Phuc, On Fri, 7 Aug 2026 at 11:31, <[email protected]> wrote: > From: bui duc phuc <[email protected]> > > platform_get_irq_optional() returns -ENXIO when the optional IRQ is not > specified. Treat -ENXIO as a valid absence of an optional IRQ, while > propagating other errors. > > Signed-off-by: bui duc phuc <[email protected]> Thanks for your patch! > --- a/drivers/thermal/renesas/rcar_gen3_thermal.c > +++ b/drivers/thermal/renesas/rcar_gen3_thermal.c > @@ -491,7 +491,7 @@ static int rcar_gen3_thermal_request_irqs(struct rcar_gen3_thermal_priv *priv, > > for (i = 0; i < 2; i++) { > irq = platform_get_irq_optional(pdev, i); > - if (irq < 0) > + if (irq < 0 && irq != -ENXIO) > return irq; > So the code may continue using -ENXIO as an interrupt number (and fail)? Why is this change needed at all? The caller of rcar_gen3_thermal_request_irqs() knows how to handle failures, as IRQs are optional. > irqname = devm_kasprintf(dev, GFP_KERNEL, "%s:ch%d", Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds