Re: [PATCH 1/3] thermal/drivers/cpufreq_cooling: Use device name instead of auto-numbering

From: Lukasz Luba
Date: Fri Mar 12 2021 - 05:59:09 EST


Hi Daniel,

Only minor comments.

On 3/10/21 11:45 AM, Daniel Lezcano wrote:
Currently the naming of a cooling device is just a cooling technique
followed by a number. When there are multiple cooling devices using
the same technique, it is impossible to clearly identify the related
device as this one is just a number.

For instance:

thermal-cpufreq-0
thermal-cpufreq-1
etc ...

The 'thermal' prefix is redundant with the subsystem namespace. This
patch removes the 'thermal prefix and changes the number by the device

missing ', after 'thermal

name. So the naming above becomes:

cpufreq-cpu0
cpufreq-cpu4
etc ...

Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
---
drivers/thermal/cpufreq_cooling.c | 28 +++++++---------------------
1 file changed, 7 insertions(+), 21 deletions(-)

diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
index 10af3341e5ea..cf0332bbdcd3 100644
--- a/drivers/thermal/cpufreq_cooling.c
+++ b/drivers/thermal/cpufreq_cooling.c
@@ -13,6 +13,7 @@
#include <linux/cpu.h>
#include <linux/cpufreq.h>
#include <linux/cpu_cooling.h>
+#include <linux/device.h>
#include <linux/energy_model.h>
#include <linux/err.h>
#include <linux/export.h>

You can now also remove the header:
#include <linux/idr.h>


other than that, LGTM

Reviewed-by: Lukasz Luba <lukasz.luba@xxxxxxx>