[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1353302917-13995-45-git-send-email-josh@joshtriplett.org>
Date: Sun, 18 Nov 2012 21:28:23 -0800
From: Josh Triplett <josh@...htriplett.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>, Minchan Kim <minchan@...nel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Michal Hocko <mhocko@...e.cz>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: Josh Triplett <josh@...htriplett.org>
Subject: [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed
mm/page_alloc.c defines is_pageblock_removable_nolock unconditionally,
but include/linux/memory_hotplug.h only prototypes it when
CONFIG_MEMORY_HOTPLUG=y and CONFIG_MEMORY_HOTREMOVE=y. Add the
corresponding conditions around the definition, too.
This also eliminates warnings from GCC (-Wmissing-prototypes) and Sparse
(-Wdecl).
mm/page_alloc.c:5634:6: warning: no previous prototype for ‘is_pageblock_removable_nolock’ [-Wmissing-prototypes]
Signed-off-by: Josh Triplett <josh@...htriplett.org>
---
mm/page_alloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d857953..706bd5f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5631,6 +5631,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count)
return false;
}
+#if defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_MEMORY_HOTREMOVE)
bool is_pageblock_removable_nolock(struct page *page)
{
struct zone *zone;
@@ -5654,6 +5655,7 @@ bool is_pageblock_removable_nolock(struct page *page)
return !has_unmovable_pages(zone, page, 0);
}
+#endif /* defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_MEMORY_HOTREMOVE) */
#ifdef CONFIG_CMA
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists