From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Bui Duc Phuc <phucduc.bui@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Markus Mayer <mmayer@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
rafael@kernel.org, Daniel Lezcano <daniel.lezcano@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] thermal/drivers/rcar_gen3: Handle -ENXIO from optional IRQ lookup
Date: Fri, 7 Aug 2026 12:36:45 +0200 [thread overview]
Message-ID: <20260807103645.GE1316230@ragnatech.se> (raw)
In-Reply-To: <CAABR9nF7sAT4C+W_qE8GVKhrtTjdm=DcpJH548RzFaYLuED+3A@mail.gmail.com>
On 2026-08-07 17:11:44 +0700, Bui Duc Phuc wrote:
> Hi Geert,
>
> Thank you for your feedback.
>
> > > 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)?
> >
>
> Yes, you are right. We should probably handle it similarly to:
> https://elixir.bootlin.com/linux/v7.2-rc6/source/drivers/thermal/renesas/rcar_thermal.c#L422
> and only assign the IRQ when the return value is positive:
> if (ret > 0)
> irq = ret;
>
> > Why is this change needed at all?
> > The caller of rcar_gen3_thermal_request_irqs() knows how to handle
> > failures, as IRQs are optional.
> >
>
> Regarding the caller, I only found rcar_gen3_thermal_request_irqs()
> being called here:
> https://elixir.bootlin.com/linux/v7.2-rc6/source/drivers/thermal/renesas/rcar_gen3_thermal.c#L530
> It does not appear to handle the error return there, so I don't think
> the caller currently handles these failures explicitly.
Yes it does. If it can't get the optional interrupts the driver does not
support setting trip-points in hardware. No?
>
> Best regards,
> Phuc
--
Kind Regards,
Niklas Söderlund
next prev parent reply other threads:[~2026-08-07 10:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 9:30 [PATCH 1/2] thermal/drivers/rcar_gen3: Handle -ENXIO from optional IRQ lookup phucduc.bui
2026-08-07 9:30 ` [PATCH 2/2] thermal/drivers/brcmstb_thermal: Propagate errors " phucduc.bui
2026-08-07 9:44 ` [PATCH 1/2] thermal/drivers/rcar_gen3: Handle -ENXIO " Geert Uytterhoeven
2026-08-07 10:11 ` Bui Duc Phuc
2026-08-07 10:36 ` Niklas Söderlund [this message]
2026-08-07 11:04 ` Bui Duc Phuc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260807103645.GE1316230@ragnatech.se \
--to=niklas.soderlund@ragnatech.se \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=daniel.lezcano@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=magnus.damm@gmail.com \
--cc=mmayer@broadcom.com \
--cc=phucduc.bui@gmail.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox