[PATCH 09/19] ppc64: change %016lx into %p

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


  CC      arch/powerpc/xmon/xmon.o
../arch/powerpc/xmon/xmon.c: In function ‘show_pte’:
../arch/powerpc/xmon/xmon.c:3016:24: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘pgd_t * {aka struct <anonymous> *}’ [-Werror=format=]
  printf("pgd  @ 0x%016lx\n", pgdir);
                        ^
../arch/powerpc/xmon/xmon.c:3022:24: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘pgd_t * {aka struct <anonymous> *}’ [-Werror=format=]
  printf("pgdp @ 0x%016lx = 0x%016lx\n", pgdp, pgd_val(*pgdp));
                        ^
../arch/powerpc/xmon/xmon.c:3036:24: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘pud_t * {aka struct <anonymous> *}’ [-Werror=format=]
  printf("pudp @ 0x%016lx = 0x%016lx\n", pudp, pud_val(*pudp));
                        ^
../arch/powerpc/xmon/xmon.c:3049:24: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘pmd_t * {aka struct <anonymous> *}’ [-Werror=format=]
  printf("pmdp @ 0x%016lx = 0x%016lx\n", pmdp, pmd_val(*pmdp));
                        ^
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 0e4dcdf12f9e..69152f00d3fc 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -3010,13 +3010,13 @@ static void show_pte(unsigned long addr)
 		return;
 	}
 
-	printf("pgd  @ 0x%016lx\n", pgdir);
+	printf("pgd  @ 0x%p\n", pgdir);
 
 	if (pgd_huge(*pgdp)) {
 		format_pte(pgdp, pgd_val(*pgdp));
 		return;
 	}
-	printf("pgdp @ 0x%016lx = 0x%016lx\n", pgdp, pgd_val(*pgdp));
+	printf("pgdp @ 0x%p = 0x%016lx\n", pgdp, pgd_val(*pgdp));
 
 	pudp = pud_offset(pgdp, addr);
 
@@ -3030,7 +3030,7 @@ static void show_pte(unsigned long addr)
 		return;
 	}
 
-	printf("pudp @ 0x%016lx = 0x%016lx\n", pudp, pud_val(*pudp));
+	printf("pudp @ 0x%p = 0x%016lx\n", pudp, pud_val(*pudp));
 
 	pmdp = pmd_offset(pudp, addr);
 
@@ -3043,7 +3043,7 @@ static void show_pte(unsigned long addr)
 		format_pte(pmdp, pmd_val(*pmdp));
 		return;
 	}
-	printf("pmdp @ 0x%016lx = 0x%016lx\n", pmdp, pmd_val(*pmdp));
+	printf("pmdp @ 0x%p = 0x%016lx\n", pmdp, pmd_val(*pmdp));
 
 	ptep = pte_offset_map(pmdp, addr);
 	if (pte_none(*ptep)) {
-- 
2.11.0



More information about the Linuxppc-dev mailing list