[PATCH] powerpc: fix udbg warning

Geoff Levand geoffrey.levand at am.sony.com
Mon Aug 7 10:51:58 EST 2006


Here's an updated version that fixes a few more warnings.

-Geoff


Fix an implicit declaration warning in hash_utils_64.c
when udbg is enabled.

hash_utils_64.c: In function ‘htab_bolt_mapping’:
hash_utils_64.c:169: warning: implicit declaration of function ‘udbg_printf’
hash_utils_64.c:251: warning: format ‘%04x’ expects type ‘unsigned int’


Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>

---

Index: cell--common--4/arch/powerpc/mm/hash_utils_64.c
===================================================================
--- cell--common--4.orig/arch/powerpc/mm/hash_utils_64.c
+++ cell--common--4/arch/powerpc/mm/hash_utils_64.c
@@ -51,6 +51,7 @@
 #include <asm/cputable.h>
 #include <asm/abs_addr.h>
 #include <asm/sections.h>
+#include <asm/udbg.h>

 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
@@ -247,7 +248,7 @@ static int __init htab_dt_scan_page_size
 			else
 				def->tlbiel = 0;

-			DBG(" %d: shift=%02x, sllp=%04x, avpnm=%08x, "
+			DBG(" %d: shift=%02x, sllp=%04lx, avpnm=%08lx, "
 			    "tlbiel=%d, penc=%d\n",
 			    idx, shift, def->sllp, def->avpnm, def->tlbiel,
 			    def->penc);
@@ -773,7 +774,7 @@ void flush_hash_page(unsigned long va, r
 {
 	unsigned long hash, index, shift, hidx, slot;

-	DBG_LOW("flush_hash_page(va=%016x)\n", va);
+	DBG_LOW("flush_hash_page(va=%016lx)\n", va);
 	pte_iterate_hashed_subpages(pte, psize, va, index, shift) {
 		hash = hpt_hash(va, shift);
 		hidx = __rpte_to_hidx(pte, index);
@@ -781,7 +782,7 @@ void flush_hash_page(unsigned long va, r
 			hash = ~hash;
 		slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 		slot += hidx & _PTEIDX_GROUP_IX;
-		DBG_LOW(" sub %d: hash=%x, hidx=%x\n", index, slot, hidx);
+		DBG_LOW(" sub %ld: hash=%lx, hidx=%lx\n", index, slot, hidx);
 		ppc_md.hpte_invalidate(slot, va, psize, local);
 	} pte_iterate_hashed_end();
 }




More information about the Linuxppc-dev mailing list