powerpc/mm: Fix build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Mon, 24 Jun 2013 14:35:55 +0000 (09:35 -0500)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 25 Jun 2013 07:24:40 +0000 (17:24 +1000)
Building with CONFIG_TRANSPARENT_HUGEPAGE disabled causes the following
build wearnings;

powerpc/arch/powerpc/include/asm/mmu-hash64.h: In function ‘__hash_page_thp’:
powerpc/arch/powerpc/include/asm/mmu-hash64.h:354: warning: no return statement in function returning non-void

This patch adds a return -1 to the static inline for __hash_page_thp()
to correct the warnings.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/mmu-hash64.h

index 3d6fbb00d20b4e1bacd39566f6ea2ec6cfecd105..c4cf01197273f8a88203d35c34b1516e356040a4 100644 (file)
@@ -351,6 +351,7 @@ static inline int __hash_page_thp(unsigned long ea, unsigned long access,
                                  int ssize, unsigned int psize)
 {
        BUG();
+       return -1;
 }
 #endif
 extern void hash_failure_debug(unsigned long ea, unsigned long access,