[PATCH v2 5/5] regcache: Amend printf() specifiers when printing registers
From: Andy Shevchenko
Date: Wed Feb 25 2026 - 11:30:08 EST
In one case the 0x is provided in the formatting string, while
the rest use # for that.
In a couple of more cases a decimal signed value specifier is used.
Amend them to use %#x when register is printed. Note, for the case,
when it's related to the read/write, use %x to be in align with
the similar messages in regmap core.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/base/regmap/regcache.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 7ac30762c236..1d1e252a9f7e 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -112,7 +112,7 @@ static int regcache_hw_init(struct regmap *map, int count)
ret = regmap_read(map, reg, &val);
map->cache_bypass = cache_bypass;
if (ret != 0) {
- dev_err(map->dev, "Failed to read %d: %d\n",
+ dev_err(map->dev, "Failed to read %x: %d\n",
reg, ret);
goto err_free;
}
@@ -509,7 +509,7 @@ int regcache_sync_region(struct regmap *map, unsigned int min,
bypass = map->cache_bypass;
name = map->cache_ops->name;
- dev_dbg(map->dev, "Syncing %s cache from %d-%d\n", name, min, max);
+ dev_dbg(map->dev, "Syncing %s cache from %#x-%#x\n", name, min, max);
trace_regcache_sync(map, name, "start region");
@@ -818,7 +818,7 @@ static int regcache_sync_block_raw_flush(struct regmap *map, const void **data,
count = (cur - base) / map->reg_stride;
- dev_dbg(map->dev, "Writing %zu bytes for %d registers from 0x%x-0x%x\n",
+ dev_dbg(map->dev, "Writing %zu bytes for %d registers from %#x-%#x\n",
count * val_bytes, count, base, cur - map->reg_stride);
map->cache_bypass = true;
--
2.50.1