summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2016-09-13 01:47:41 -0400
committerGuenter Roeck <linux@roeck-us.net>2016-09-13 10:27:05 -0400
commitacf32964de8e8f02839796f1fe512b50a192e141 (patch)
tree7a0f311b160e5aaab0ce28179ce693081f6eabee /drivers/hwmon
parent93cacfd41f82eea00b420d62e29a493ca3d07b74 (diff)
hwmon: (ibmpowernv) Fix label for cores numbers not threads
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 <mikey@neuling.org> Acked-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/ibmpowernv.c8
1 files changed, 3 insertions, 5 deletions
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,
143 if (cpuid >= 0) 143 if (cpuid >= 0)
144 /* 144 /*
145 * The digital thermal sensors are associated 145 * The digital thermal sensors are associated
146 * with a core. Let's print out the range of 146 * with a core.
147 * cpu ids corresponding to the hardware
148 * threads of the core.
149 */ 147 */
150 n += snprintf(sdata->label + n, 148 n += snprintf(sdata->label + n,
151 sizeof(sdata->label) - n, " %d-%d", 149 sizeof(sdata->label) - n, " %d",
152 cpuid, cpuid + threads_per_core - 1); 150 cpuid);
153 else 151 else
154 n += snprintf(sdata->label + n, 152 n += snprintf(sdata->label + n,
155 sizeof(sdata->label) - n, " phy%d", id); 153 sizeof(sdata->label) - n, " phy%d", id);