Re: [PATCH] thermal/core: Fix missing stub for devm_thermal_cooling_device_register
From: Rafael J. Wysocki
Date: Mon Jun 01 2026 - 08:12:15 EST
On Mon, Jun 1, 2026 at 11:02 AM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
>
> Even it is very unlikely the thermal framework is disabled, the newly
> added devm_thermal_cooling_device_register() function has not the stub
> when the thermal framework is optout in the kernel.
>
> Add it.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202605301554.S9n45bfQ-lkp@xxxxxxxxx/
> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
Acked-by: Rafael J. Wysocki (Intel) <rafael@xxxxxxxxxx>
> ---
> include/linux/thermal.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 81be6e6061b3..083b4f533933 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -344,7 +344,11 @@ static inline struct thermal_cooling_device *
> thermal_cooling_device_register(const char *type, void *devdata,
> const struct thermal_cooling_device_ops *ops)
> { return ERR_PTR(-ENODEV); }
> +
> static inline struct thermal_cooling_device *
> +devm_thermal_cooling_device_register(struct device *dev, const char *type, void *devdata,
> + const struct thermal_cooling_device_ops *ops)
> +{ return ERR_PTR(-ENODEV); }
>
> static inline void thermal_cooling_device_unregister(
> struct thermal_cooling_device *cdev)
> --
> 2.43.0
>