[PATCH 2/2] peci-cputemp: label CPU cores from zero instead of one

Zev Weiss zev at bewilderbeest.net
Sun Sep 27 07:27:34 AEST 2020


Zero-based numbering is more consistent with all other cpu/core
numbering I'm aware of (including the PECI spec).

Signed-off-by: Zev Weiss <zev at bewilderbeest.net>
---
 drivers/hwmon/peci-cputemp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c
index b9fe91281d58..78e442f433a7 100644
--- 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 + 1);
+	sprintf(priv->coretemp_label[idx], "Core %d", idx);
 
 	return 0;
 }
-- 
2.28.0



More information about the openbmc mailing list