From: Mathieu Malaterre <malat@debian.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: Mathieu Malaterre <malat@debian.org>, Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>, Mel Gorman <mgorman@techsingularity.net>, Pavel Tatashin <pasha.tatashin@oracle.com>, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: move function ‘is_pageblock_removable_nolock’ inside blockers Date: Sat, 5 May 2018 22:11:06 +0200 [thread overview] Message-ID: <20180505201107.21070-1-malat@debian.org> (raw) Function ‘is_pageblock_removable_nolock’ is not used unless CONFIG_MEMORY_HOTREMOVE is activated. Move it in between #ifdef sentinel to match prototype in <linux/memory_hotplug.h>. Silence gcc warning (W=1): mm/page_alloc.c:7704:6: warning: no previous prototype for ‘is_pageblock_removable_nolock’ [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre <malat@debian.org> --- mm/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 905db9d7962f..94ca579938e5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7701,6 +7701,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count, return false; } +#ifdef CONFIG_MEMORY_HOTREMOVE bool is_pageblock_removable_nolock(struct page *page) { struct zone *zone; @@ -7723,6 +7724,7 @@ bool is_pageblock_removable_nolock(struct page *page) return !has_unmovable_pages(zone, page, 0, MIGRATE_MOVABLE, true); } +#endif #if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Malaterre <malat@debian.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: Mathieu Malaterre <malat@debian.org>, Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>, Mel Gorman <mgorman@techsingularity.net>, Pavel Tatashin <pasha.tatashin@oracle.com>, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: move function ‘is_pageblock_removable_nolock’ inside blockers Date: Sat, 5 May 2018 22:11:06 +0200 [thread overview] Message-ID: <20180505201107.21070-1-malat@debian.org> (raw) Function a??is_pageblock_removable_nolocka?? is not used unless CONFIG_MEMORY_HOTREMOVE is activated. Move it in between #ifdef sentinel to match prototype in <linux/memory_hotplug.h>. Silence gcc warning (W=1): mm/page_alloc.c:7704:6: warning: no previous prototype for a??is_pageblock_removable_nolocka?? [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre <malat@debian.org> --- mm/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 905db9d7962f..94ca579938e5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7701,6 +7701,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count, return false; } +#ifdef CONFIG_MEMORY_HOTREMOVE bool is_pageblock_removable_nolock(struct page *page) { struct zone *zone; @@ -7723,6 +7724,7 @@ bool is_pageblock_removable_nolock(struct page *page) return !has_unmovable_pages(zone, page, 0, MIGRATE_MOVABLE, true); } +#endif #if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) -- 2.11.0
next reply other threads:[~2018-05-05 20:11 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-05 20:11 Mathieu Malaterre [this message] 2018-05-05 20:11 ` [PATCH] mm: move function ‘is_pageblock_removable_nolock’ inside blockers Mathieu Malaterre 2018-05-09 7:43 ` Michal Hocko 2018-05-09 7:43 ` Michal Hocko 2018-05-09 18:59 ` [PATCH v2] mm: move function ‘is_pageblock_removable_nolock’ to mm/memory_hotplug.c Mathieu Malaterre 2018-05-09 18:59 ` Mathieu Malaterre 2018-05-10 8:36 ` Michal Hocko 2018-05-10 8:36 ` Michal Hocko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180505201107.21070-1-malat@debian.org \ --to=malat@debian.org \ --cc=akpm@linux-foundation.org \ --cc=iamjoonsoo.kim@lge.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=mgorman@techsingularity.net \ --cc=mhocko@suse.com \ --cc=pasha.tatashin@oracle.com \ --cc=penguin-kernel@I-love.SAKURA.ne.jp \ --cc=vbabka@suse.cz \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.