linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* mm, compaction: fix build errors with kcompactd
@ 2016-02-09 14:15 Arnd Bergmann
  2016-02-10 14:10 ` Vlastimil Babka
  2016-02-13 22:23 ` Paul Gortmaker
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-02-09 14:15 UTC (permalink / raw)
  To: Vlastimil Babka, Andrew Morton; +Cc: linux-kernel, linux-mm

The newly added kcompactd code introduces multiple build errors:

include/linux/compaction.h:91:12: error: 'kcompactd_run' defined but not used [-Werror=unused-function]
mm/compaction.c:1953:2: error: implicit declaration of function 'hotcpu_notifier' [-Werror=implicit-function-declaration]

This marks the new empty wrapper functions as 'inline' to avoid unused-function warnings,
and includes linux/cpu.h to get the hotcpu_notifier declaration.

Fixes: 8364acdfa45a ("mm, compaction: introduce kcompactd")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I stumbled over this while trying out the mmots patches today for an unrelated reason.

diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 1367c0564d42..d7c8de583a23 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -88,15 +88,15 @@ static inline bool compaction_deferred(struct zone *zone, int order)
 	return true;
 }
 
-static int kcompactd_run(int nid)
+static inline int kcompactd_run(int nid)
 {
 	return 0;
 }
-static void kcompactd_stop(int nid)
+static inline void kcompactd_stop(int nid)
 {
 }
 
-static void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
+static inline void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
 {
 }
 
diff --git a/mm/compaction.c b/mm/compaction.c
index 67bb651c56b1..4cb1c2ef5abb 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -7,6 +7,7 @@
  *
  * Copyright IBM Corp. 2007-2010 Mel Gorman <mel@csn.ul.ie>
  */
+#include <linux/cpu.h>
 #include <linux/swap.h>
 #include <linux/migrate.h>
 #include <linux/compaction.h>

--
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] 3+ messages in thread

end of thread, other threads:[~2016-02-13 22:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09 14:15 mm, compaction: fix build errors with kcompactd Arnd Bergmann
2016-02-10 14:10 ` Vlastimil Babka
2016-02-13 22:23 ` Paul Gortmaker

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).