From acf32964de8e8f02839796f1fe512b50a192e141 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Tue, 13 Sep 2016 15:47:41 +1000 Subject: hwmon: (ibmpowernv) Fix label for cores numbers not threads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently the label says "Core" but lists the thread numbers. This ends up looking like this: # cat /sys/class/hwmon/hwmon0/temp[1-4]_label Core 0-7 Core 8-15 Core 16-23 Core 24-31 This is misleading as it looks like it's cores 0-7 when it's actually threads 0-7. This changes the print to just give the core number, so the output now looks like this: # cat /sys/class/hwmon/hwmon0/temp[1-4]_label Core 0 Core 8 Core 16 Core 24 Signed-off-by: Michael Neuling Acked-by: Cédric Le Goater Signed-off-by: Guenter Roeck --- drivers/hwmon/ibmpowernv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/hwmon') diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c index 55b5a8ff1cfe..6d2e6605751c 100644 --- a/drivers/hwmon/ibmpowernv.c +++ b/drivers/hwmon/ibmpowernv.c @@ -143,13 +143,11 @@ static void __init make_sensor_label(struct device_node *np, if (cpuid >= 0) /* * The digital thermal sensors are associated - * with a core. Let's print out the range of - * cpu ids corresponding to the hardware - * threads of the core. + * with a core. */ n += snprintf(sdata->label + n, - sizeof(sdata->label) - n, " %d-%d", - cpuid, cpuid + threads_per_core - 1); + sizeof(sdata->label) - n, " %d", + cpuid); else n += snprintf(sdata->label + n, sizeof(sdata->label) - n, " phy%d", id); -- cgit v1.2.3