linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Mark create_huge_pmd() inline to prevent build failure
@ 2017-07-12  6:57 Geert Uytterhoeven
  2017-07-12  7:22 ` Arnd Bergmann
  2017-07-13  0:29 ` Dan Williams
  0 siblings, 2 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2017-07-12  6:57 UTC (permalink / raw)
  To: Dan Williams, Andrew Morton
  Cc: Arnd Bergmann, linux-mm, linux-kernel, Geert Uytterhoeven

With gcc 4.1.2:

    mm/memory.o: In function `create_huge_pmd':
    memory.c:(.text+0x93e): undefined reference to `do_huge_pmd_anonymous_page'

Converting transparent_hugepage_enabled() from a macro to a static
inline function reduced the ability of the compiler to remove unused
code.

Fix this by marking create_huge_pmd() inline.

Fixes: 16981d763501c0e0 ("mm: improve readability of transparent_hugepage_enabled()")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Interestingly, create_huge_pmd() is emitted in the assembler output, but
never called.
---
 mm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index cbb57194687e393a..0e517be91a89e162 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3591,7 +3591,7 @@ static int do_numa_page(struct vm_fault *vmf)
 	return 0;
 }
 
-static int create_huge_pmd(struct vm_fault *vmf)
+static inline int create_huge_pmd(struct vm_fault *vmf)
 {
 	if (vma_is_anonymous(vmf->vma))
 		return do_huge_pmd_anonymous_page(vmf);
-- 
2.7.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-13  7:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12  6:57 [PATCH] mm: Mark create_huge_pmd() inline to prevent build failure Geert Uytterhoeven
2017-07-12  7:22 ` Arnd Bergmann
2017-07-12  7:37   ` Geert Uytterhoeven
2017-07-12  8:00     ` Arnd Bergmann
2017-07-13  0:29 ` Dan Williams
2017-07-13  4:01   ` Dan Williams
2017-07-13  7:04   ` Geert Uytterhoeven
2017-07-13  7:49     ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).