From: Michael Neuling <mikey@neuling.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "Cédric Le Goater" <clg@fr.ibm.com>,
linux-hwmon@vger.kernel.org, "Andrew Jeffery" <andrew@aj.id.au>,
me@neuling.org
Subject: [PATCH] hwmon: (ibmpowernv) Fix label for cores numbers not threads
Date: Tue, 13 Sep 2016 15:47:41 +1000 [thread overview]
Message-ID: <1473745661-11890-1-git-send-email-mikey@neuling.org> (raw)
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>
---
drivers/hwmon/ibmpowernv.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
index 55b5a8ff1c..6d2e660575 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);
--
2.7.4
next reply other threads:[~2016-09-13 5:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-13 5:47 Michael Neuling [this message]
2016-09-13 6:07 ` [PATCH] hwmon: (ibmpowernv) Fix label for cores numbers not threads Cédric Le Goater
2016-09-13 14:28 ` Guenter Roeck
2016-09-14 1:14 ` Michael Neuling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473745661-11890-1-git-send-email-mikey@neuling.org \
--to=mikey@neuling.org \
--cc=andrew@aj.id.au \
--cc=clg@fr.ibm.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=me@neuling.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.