Commit 05ec899140d2f602544f9ec6aa753ab36feff0b0

Authored by Heinrich Schuchardt
Committed by Tom Rini
1 parent 562274730a
Exists in emb_lf_v2022.04

bootcount: fix printf() code

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/bootcount/bootcount_syscon.c
... ... @@ -107,8 +107,8 @@
107 107 return -EINVAL;
108 108 }
109 109 if (reg_size != 4) {
110   - dev_err(dev, "%s: Unsupported register size: %d\n", __func__,
111   - reg_size);
  110 + dev_err(dev, "%s: Unsupported register size: %pa\n", __func__,
  111 + &reg_size);
112 112 return -EINVAL;
113 113 }
114 114