From 05ec899140d2f602544f9ec6aa753ab36feff0b0 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 19 Jan 2022 01:33:43 +0100 Subject: [PATCH] bootcount: fix printf() code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Simon Glass --- drivers/bootcount/bootcount_syscon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bootcount/bootcount_syscon.c b/drivers/bootcount/bootcount_syscon.c index 413fd5b..f80d870 100644 --- a/drivers/bootcount/bootcount_syscon.c +++ b/drivers/bootcount/bootcount_syscon.c @@ -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__, + ®_size); return -EINVAL; } -- 2.7.4