[dev-5.4] hwmon: peci: change label strings to reflect natural numbers
diff mbox series

Message ID 20200211234950.4010-1-jae.hyun.yoo@linux.intel.com
State New
Headers show
Series
  • [dev-5.4] hwmon: peci: change label strings to reflect natural numbers
Related show

Commit Message

Jae Hyun Yoo Feb. 11, 2020, 11:49 p.m. UTC
This commit changes label strings to reflect user friendly natural
numbers like 'Core 1' instead of 'Core 0' and 'DIMM A1' instead of
'DIMM A0'.

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
---
 drivers/hwmon/peci-cputemp.c  | 2 +-
 drivers/hwmon/peci-dimmtemp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 drivers/hwmon/peci-cputemp.c
 mode change 100644 => 100755 drivers/hwmon/peci-dimmtemp.c

Patch
diff mbox series

diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c
old mode 100644
new mode 100755
index 78e442f433a7..b9fe91281d58
--- a/drivers/hwmon/peci-cputemp.c
+++ b/drivers/hwmon/peci-cputemp.c
@@ -363,7 +363,7 @@  static int create_core_temp_label(struct peci_cputemp *priv, int idx)
 	if (!priv->coretemp_label[idx])
 		return -ENOMEM;
 
-	sprintf(priv->coretemp_label[idx], "Core %d", idx);
+	sprintf(priv->coretemp_label[idx], "Core %d", idx + 1);
 
 	return 0;
 }
diff --git a/drivers/hwmon/peci-dimmtemp.c b/drivers/hwmon/peci-dimmtemp.c
old mode 100644
new mode 100755
index 8ceab08d06e1..45eabd2ec5c8
--- a/drivers/hwmon/peci-dimmtemp.c
+++ b/drivers/hwmon/peci-dimmtemp.c
@@ -260,7 +260,7 @@  static int create_dimm_temp_label(struct peci_dimmtemp *priv, int chan)
 	rank = chan / priv->gen_info->dimm_idx_max;
 	idx = chan % priv->gen_info->dimm_idx_max;
 
-	sprintf(priv->dimmtemp_label[chan], "DIMM %c%d", 'A' + rank, idx);
+	sprintf(priv->dimmtemp_label[chan], "DIMM %c%d", 'A' + rank, idx + 1);
 
 	return 0;
 }