diff options
| author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2025-07-07 13:54:08 +0200 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2025-07-07 23:18:58 +0200 |
| commit | 12aa3e0cb0c6f8d406be00bc9f5d89bfbee7b9d9 (patch) | |
| tree | f619c8b701027fa5e9d13a3e278795c32d4572ac /drivers/i3c | |
| parent | 8d53c0d645e3b2a1e341ffb4dbea345c55035c6b (diff) | |
i3c: prefix hexadecimal entries in sysfs
Hexadecimal values in sysfs should be prefixed with '0x' like e.g. PCI
and SCSI already do it. Also ensure the two digit length since BCR and
DCR are a byte in size.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250707115409.73545-2-wsa+renesas@sang-engineering.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/i3c')
| -rw-r--r-- | drivers/i3c/master.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 1a68acee1f13..e00991444f31 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -141,7 +141,7 @@ static ssize_t bcr_show(struct device *dev, i3c_bus_normaluse_lock(bus); desc = dev_to_i3cdesc(dev); - ret = sprintf(buf, "%x\n", desc->info.bcr); + ret = sprintf(buf, "0x%02x\n", desc->info.bcr); i3c_bus_normaluse_unlock(bus); return ret; @@ -158,7 +158,7 @@ static ssize_t dcr_show(struct device *dev, i3c_bus_normaluse_lock(bus); desc = dev_to_i3cdesc(dev); - ret = sprintf(buf, "%x\n", desc->info.dcr); + ret = sprintf(buf, "0x%02x\n", desc->info.dcr); i3c_bus_normaluse_unlock(bus); return ret; |