[PATCH 1/2] thermal/drivers/rcar_gen3: Handle -ENXIO from optional IRQ lookup

Bui Duc Phuc phucduc.bui at gmail.com
Fri Aug 7 04:04:48 PDT 2026


Hi Niklas Söderlund,

Thank you for your feedback .

> > 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?
>

Yes, for -ENXIO, you're right.
The caller treats it as the absence of optional IRQs and disables
hardware trip-point support.
However, this also means that -EPROBE_DEFER, -EINVAL, and other errors
are currently treated the same way.
The caller does not distinguish these errors from -ENXIO, so the probe
continues instead of propagating the actual error.

I think the caller should distinguish -ENXIO from other errors:
keep the current behavior for -ENXIO, but propagate -EPROBE_DEFER,
-EINVAL, and other errors.

ret = rcar_gen3_thermal_request_irqs(priv, pdev);
if (ret == -ENXIO) {
        priv->ops.set_trips = NULL;
} else if (ret) {
        return ret;
}

Best regards,
Phuc



More information about the linux-arm-kernel mailing list