]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
regcache: Amend printf() specifiers when printing registers
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 2 Mar 2026 09:56:57 +0000 (10:56 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 2 Mar 2026 14:51:05 +0000 (14:51 +0000)
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@linux.intel.com>
Link: https://patch.msgid.link/20260302095847.2310066-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regcache.c

index e155408b454c15b792d0e9beb68f934e2e48bf26..13c480b6e21d54fabd6fb3bcc77c825d6210627a 100644 (file)
@@ -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;
                        }
@@ -508,7 +508,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");