public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/1] bootcount: fix printf() code
@ 2022-01-19  0:33 Heinrich Schuchardt
  2022-01-27 15:05 ` Simon Glass
  2022-01-29 18:49 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2022-01-19  0:33 UTC (permalink / raw)
  To: Tom Rini; +Cc: Simon Glass, Nandor Han, u-boot, Heinrich Schuchardt

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(-)

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__,
+			&reg_size);
 		return -EINVAL;
 	}
 
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] bootcount: fix printf() code
  2022-01-19  0:33 [PATCH 1/1] bootcount: fix printf() code Heinrich Schuchardt
@ 2022-01-27 15:05 ` Simon Glass
  2022-01-29 18:49 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2022-01-27 15:05 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Tom Rini, Nandor Han, U-Boot Mailing List

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] bootcount: fix printf() code
  2022-01-19  0:33 [PATCH 1/1] bootcount: fix printf() code Heinrich Schuchardt
  2022-01-27 15:05 ` Simon Glass
@ 2022-01-29 18:49 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-01-29 18:49 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Simon Glass, Nandor Han, u-boot

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

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!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-29 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-19  0:33 [PATCH 1/1] bootcount: fix printf() code Heinrich Schuchardt
2022-01-27 15:05 ` Simon Glass
2022-01-29 18:49 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox