erst: drop cast to long long
PATCH 1/1 erst: drop cast to long long
The way to print uint64_t is with PRIx64, not with a cast to long long.
Cc Eric DeVolder <[email protected]>
Signed-off-by Michael S. Tsirkin <[email protected]>
--- tests/qtest/erst-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qtest/erst-test.c +1 -1
@@ -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; }
Signature · 1 line
MST
Quoted 8 lines · Michael S. Tsirkin
The way to print
uint64_tis with PRIx64, not with a cast to long long.Cc Eric DeVolder <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- tests/qtest/erst-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 14 lines · Michael S. Tsirkin
The way to print
uint64_tis with PRIx64, not with a cast to long long.Cc Eric DeVolder <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- tests/qtest/erst-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qtest/erst-test.c +0
-0
tests/qtest/erst-test.c static inline uint64_t in_reg64(ERSTState *s, unsigned reg) · line 81
Quoted 8 lines
tests/qtest/erst-test.c +1
-1@@ -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 <[email protected]>