[PATCH 2/3] Fix a compiler warning in mm/tlb_64.c

Michael Ellerman michael at ellerman.id.au
Thu Jul 13 17:54:44 EST 2006


The compiler doesn't understand that BUG() never returns, so complains that
psize isn't set. Just set it to the normal value, which seems to produce nice
code and keeps gcc happy.

Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---

 arch/powerpc/mm/tlb_64.c |    1 +
 1 file changed, 1 insertion(+)

Index: to-merge/arch/powerpc/mm/tlb_64.c
===================================================================
--- to-merge.orig/arch/powerpc/mm/tlb_64.c
+++ to-merge/arch/powerpc/mm/tlb_64.c
@@ -146,6 +146,7 @@ void hpte_update(struct mm_struct *mm, u
 		psize = mmu_huge_psize;
 #else
 		BUG();
+		psize = pte_pagesize_index(pte); /* shutup gcc */
 #endif
 	} else
 		psize = pte_pagesize_index(pte);



More information about the Linuxppc-dev mailing list