]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootcount: fix printf() code
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 19 Jan 2022 00:33:43 +0000 (01:33 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 28 Jan 2022 22:58:41 +0000 (17:58 -0500)
For printing phys_addr_t we should use %pa to avoid warning like:

drivers/bootcount/bootcount_syscon.c:110:17: note: in expansion of macro ‘dev_err’
  110 |                 dev_err(dev, "%s: Unsupported register size: %d\n", __func__,
      |                 ^~~~~~~

seen for sandbox_defconfig with CONFIG_PHYS_64BIT=y.

Cf. commit 1eebd14b7902 ("vsprintf: Add modifier for phys_addr_t")

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/bootcount/bootcount_syscon.c

index 413fd5bb9df5eb87f148b314e62855c1a8086dd5..f80d87071d98b0dbf6d612691395954ad13335b3 100644 (file)
@@ -107,8 +107,8 @@ static int bootcount_syscon_of_to_plat(struct udevice *dev)
                return -EINVAL;
        }
        if (reg_size != 4) {
-               dev_err(dev, "%s: Unsupported register size: %d\n", __func__,
-                       reg_size);
+               dev_err(dev, "%s: Unsupported register size: %pa\n", __func__,
+                       &reg_size);
                return -EINVAL;
        }