Re: [PATCH v1 05/14] thermal/core: Remove node pointer parameter parameter when registering a tz

sashiko-bot
2026-04-19T18:41:24Z

Sashiko AI review found 2 potential issue(s):
- [Medium] Commit subject incorrectly states the patch modifies a thermal zone registration function
- [Low] Obsolete kernel-doc comment after parameter removal
--

commit 2fc21aeabe9b7d0fc7c089083c8917e91802ab1b
Author: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>

thermal/core: Remove node pointer parameter parameter when registering a tz

This commit removes the device_node pointer parameter from the core thermal
cooling device registration function, since OF variants are now available.

> thermal/core: Remove node pointer parameter parameter when registering a tz

This isn't a bug, but there's a typo (parameter parameter) in the subject
line.

Additionally, does the subject incorrectly describe the changes? It mentions
registering a tz (thermal zone), but the function being modified is
__thermal_cooling_device_register, which registers a cooling device.

> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 26231acea3829..2f5d214d51a10 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -1042,7 +1042,6 @@ void thermal_cooling_device_init_complete(struct thermal_cooling_device *cdev)
>
> /**
> * __thermal_cooling_device_register() - register a new thermal cooling device
> - * @np: a pointer to a device tree node.
> * @type: the thermal cooling device type.
> * @devdata: device private data.
> * @ops: standard thermal cooling devices callbacks.

Does this code leave an obsolete description in the kernel-doc?

Since the device tree node pointer parameter is being removed, the paragraph
explaining it further down in the comment block seems stale:

drivers/thermal/thermal_core.c:__thermal_cooling_device_register() {
...
* This interface function adds a new thermal cooling device (fan/processor/...)
* to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself
* to all the thermal zone devices registered at the same time.
* It also gives the opportunity to link the cooling device to a device tree
* node, so that it can be bound to a thermal zone created out of device tree.
*
* Return: a pointer to the created struct thermal_cooling_device or an
...
}

--
Sashiko AI review · https://sashiko.dev/#/patchset/20260419182203.4083985-1-daniel.lezcano@oss.qualcomm.com?part=5