Mesa (master): freedreno/perfcntrs/fdperf: fix u64 print on 32-bit builds

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 27 17:15:10 UTC 2019


Module: Mesa
Branch: master
Commit: 24cde37e8d26332c7e5b13c2793efc44677180c6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=24cde37e8d26332c7e5b13c2793efc44677180c6

Author: Jonathan Marek <jonathan at marek.ca>
Date:   Wed Nov 27 10:44:57 2019 -0500

freedreno/perfcntrs/fdperf: fix u64 print on 32-bit builds

Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Reviewed-by: Rob Clark <robdclark at chromium.org>

---

 src/freedreno/perfcntrs/fdperf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/perfcntrs/fdperf.c b/src/freedreno/perfcntrs/fdperf.c
index 7e562367df6..45d2a18ebe2 100644
--- a/src/freedreno/perfcntrs/fdperf.c
+++ b/src/freedreno/perfcntrs/fdperf.c
@@ -39,6 +39,7 @@
 #include <unistd.h>
 #include <curses.h>
 #include <libconfig.h>
+#include <inttypes.h>
 
 #include "drm/freedreno_drmif.h"
 #include "drm/freedreno_ringbuffer.h"
@@ -369,7 +370,7 @@ find_device(void)
 
 	free(b);
 
-	printf("i/o region at %08lx (size: %x)\n", dev.base, dev.size);
+	printf("i/o region at %08"PRIu64" (size: %x)\n", dev.base, dev.size);
 
 	/* try MAX_FREQ first as that will work regardless of old dt
 	 * dt bindings vs upstream bindings:




More information about the mesa-commit mailing list