qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] erst: drop cast to long long
@ 2022-02-06  9:35 Michael S. Tsirkin
  2022-02-06 18:28 ` Philippe Mathieu-Daudé via
  2022-02-07  6:11 ` Thomas Huth
  0 siblings, 2 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2022-02-06  9:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth, Eric DeVolder

The way to print uint64_t is with PRIx64, not with
a cast to long long.

Cc: Eric DeVolder <eric.devolder@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tests/qtest/erst-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/erst-test.c b/tests/qtest/erst-test.c
index c6a0ae4013..f94cd8dd8e 100644
--- a/tests/qtest/erst-test.c
+++ b/tests/qtest/erst-test.c
@@ -75,7 +75,7 @@ static inline uint64_t in_reg64(ERSTState *s, unsigned reg)
     uint64_t res;
 
     res = qpci_io_readq(s->dev, s->reg_bar, reg);
-    g_test_message("*%s -> %016llx", name, (unsigned long long)res);
+    g_test_message("*%s -> %016" PRIx64, name, res);
 
     return res;
 }
-- 
MST



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

* Re: [PATCH] erst: drop cast to long long
  2022-02-06  9:35 [PATCH] erst: drop cast to long long Michael S. Tsirkin
@ 2022-02-06 18:28 ` Philippe Mathieu-Daudé via
  2022-02-07  6:11 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-06 18:28 UTC (permalink / raw)
  To: Michael S. Tsirkin, qemu-devel
  Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth, Eric DeVolder

On 6/2/22 10:35, Michael S. Tsirkin wrote:
> The way to print uint64_t is with PRIx64, not with
> a cast to long long.
> 
> Cc: Eric DeVolder <eric.devolder@oracle.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tests/qtest/erst-test.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



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

* Re: [PATCH] erst: drop cast to long long
  2022-02-06  9:35 [PATCH] erst: drop cast to long long Michael S. Tsirkin
  2022-02-06 18:28 ` Philippe Mathieu-Daudé via
@ 2022-02-07  6:11 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2022-02-07  6:11 UTC (permalink / raw)
  To: Michael S. Tsirkin, qemu-devel
  Cc: Laurent Vivier, Paolo Bonzini, Eric DeVolder, QEMU Trivial

On 06/02/2022 10.35, Michael S. Tsirkin wrote:
> The way to print uint64_t is with PRIx64, not with
> a cast to long long.
> 
> Cc: Eric DeVolder <eric.devolder@oracle.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tests/qtest/erst-test.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/erst-test.c b/tests/qtest/erst-test.c
> index c6a0ae4013..f94cd8dd8e 100644
> --- a/tests/qtest/erst-test.c
> +++ b/tests/qtest/erst-test.c
> @@ -75,7 +75,7 @@ static inline uint64_t in_reg64(ERSTState *s, unsigned reg)
>       uint64_t res;
>   
>       res = qpci_io_readq(s->dev, s->reg_bar, reg);
> -    g_test_message("*%s -> %016llx", name, (unsigned long long)res);
> +    g_test_message("*%s -> %016" PRIx64, name, res);
>   
>       return res;
>   }

Reviewed-by: Thomas Huth <thuth@redhat.com>



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

end of thread, other threads:[~2022-02-07  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-06  9:35 [PATCH] erst: drop cast to long long Michael S. Tsirkin
2022-02-06 18:28 ` Philippe Mathieu-Daudé via
2022-02-07  6:11 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).