Skip to content

Commit f48781d

Browse files
oberparVasily Gorbik
authored andcommitted
s390/cio: export CMG value as decimal
Change format of the "cmg" sysfs attribute from hex to decimal to make it easier to consume. Note that this should not break any existing users since only values 2 and 3 are currently exported. Also the main user already assumes decimal notation [1]. [1] https://sourceforge.net/p/sblim/gather/ci/master/tree/plugin/metriczCH.c Reviewed-by: Vineeth Vijayan <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent f139a7a commit f48781d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/s390/cio/chp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static ssize_t chp_cmg_show(struct device *dev, struct device_attribute *attr,
334334
return 0;
335335
if (chp->cmg == -1) /* channel measurements not available */
336336
return sprintf(buf, "unknown\n");
337-
return sprintf(buf, "%x\n", chp->cmg);
337+
return sprintf(buf, "%d\n", chp->cmg);
338338
}
339339

340340
static DEVICE_ATTR(cmg, 0444, chp_cmg_show, NULL);

0 commit comments

Comments
 (0)