Thread (4 messages) 4 messages, 3 authors, 2013-06-24

Re: [PATCH] Correct build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled

From: Aneesh Kumar K.V <hidden>
Date: 2013-06-24 15:05:44

Nathan Fontenot [off-list ref] writes:
Building with CONFIG_TRANSPARENT_HUGEPAGE disabled causes the following
build wearnings;

powerpc/arch/powerpc/include/asm/mmu-hash64.h: In function =E2=80=98__has=
h_page_thp=E2=80=99:
powerpc/arch/powerpc/include/asm/mmu-hash64.h:354: warning: no return sta=
tement 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 <redacted>
Reviewed-by: Aneesh Kumar K.V <redacted>

Wondering why i am not finding this

[root@llmp24l02 thp]# make arch/powerpc/mm/hash_utils_64.o
....
.....
  CC      arch/powerpc/mm/hash_utils_64.o
[root@llmp24l02 thp]# grep TRANSPARENT_HUGEPAGE .config
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=3Dy
# CONFIG_TRANSPARENT_HUGEPAGE is not set
[root@llmp24l02 thp]#=20
[root@llmp24l02 thp]# gcc --version
gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

---
 arch/powerpc/include/asm/mmu-hash64.h |    1 +
 1 file changed, 1 insertion(+)

Index: powerpc/arch/powerpc/include/asm/mmu-hash64.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
quoted hunk ↗ jump to hunk
--- powerpc.orig/arch/powerpc/include/asm/mmu-hash64.h	2013-06-24 07:54:0=
8.000000000 -0500
quoted hunk ↗ jump to hunk
+++ powerpc/arch/powerpc/include/asm/mmu-hash64.h	2013-06-24 08:07:56.000=
000000 -0500
quoted hunk ↗ jump to hunk
@@ -351,6 +351,7 @@
 				  int ssize, unsigned int psize)
 {
 	BUG();
+	return -1;
 }
 #endif
 extern void hash_failure_debug(unsigned long ea, unsigned long access,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help