[PATCH 11/19] ppc64: change %lx into %x

Mathieu Malaterre malat at debian.org
Fri Mar 16 22:02:16 AEDT 2018


  CC      arch/powerpc/xmon/xmon.o
../arch/powerpc/xmon/xmon.c: In function ‘dump_one_paca’:
../arch/powerpc/xmon/xmon.c:2380:43: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u32 {aka unsigned int}’ [-Werror=format=]
   printf(" slb_cache[%d]:        = 0x%016lx\n", i, p->slb_cache[i]);
                                           ^
cc1: all warnings being treated as errors

Signed-off-by: Mathieu Malaterre <malat at debian.org>
---
 arch/powerpc/xmon/xmon.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index e706139030ad..7eb656274ea7 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2374,7 +2374,7 @@ static void dump_one_paca(int cpu)
 	DUMP(p, vmalloc_sllp, "x");
 	DUMP(p, slb_cache_ptr, "x");
 	for (i = 0; i < SLB_CACHE_ENTRIES; i++)
-		printf(" slb_cache[%d]:        = 0x%016lx\n", i, p->slb_cache[i]);
+		printf(" slb_cache[%d]:        = 0x%016x\n", i, p->slb_cache[i]);
 
 	DUMP(p, rfi_flush_fallback_area, "px");
 #endif
@@ -3851,9 +3851,9 @@ static void dump_spu_fields(struct spu *spu)
 	DUMP_FIELD(spu, "0x%lx", class_0_dar);
 	DUMP_FIELD(spu, "0x%lx", class_1_dar);
 	DUMP_FIELD(spu, "0x%lx", class_1_dsisr);
-	DUMP_FIELD(spu, "0x%lx", irqs[0]);
-	DUMP_FIELD(spu, "0x%lx", irqs[1]);
-	DUMP_FIELD(spu, "0x%lx", irqs[2]);
+	DUMP_FIELD(spu, "0x%x", irqs[0]);
+	DUMP_FIELD(spu, "0x%x", irqs[1]);
+	DUMP_FIELD(spu, "0x%x", irqs[2]);
 	DUMP_FIELD(spu, "0x%x", slb_replace);
 	DUMP_FIELD(spu, "%d", pid);
 	DUMP_FIELD(spu, "0x%p", mm);
-- 
2.11.0



More information about the Linuxppc-dev mailing list