Message ID | 20220119003343.95620-1-heinrich.schuchardt@canonical.com |
---|---|
State | Accepted |
Commit | 05ec899140d2f602544f9ec6aa753ab36feff0b0 |
Delegated to: | Tom Rini |
Headers | show |
Series | [1/1] bootcount: fix printf() code | expand |
On Tue, 18 Jan 2022 at 17:33, Heinrich Schuchardt <heinrich.schuchardt@canonical.com> wrote: > > 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> > --- > drivers/bootcount/bootcount_syscon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org>
On Wed, Jan 19, 2022 at 01:33:43AM +0100, Heinrich Schuchardt wrote: > 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> Applied to u-boot/master, thanks!
diff --git a/drivers/bootcount/bootcount_syscon.c b/drivers/bootcount/bootcount_syscon.c index 413fd5bb9d..f80d87071d 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; }
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> --- drivers/bootcount/bootcount_syscon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)