From: Michele Curti Date: Sat, 13 Dec 2014 00:56:35 +0000 (-0800) Subject: mm/memcontrol.c: fix defined but not used compiler warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ae6e71d3d900c398bdb346ac25733b2efa9b3752;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mm/memcontrol.c: fix defined but not used compiler warning test_mem_cgroup_node_reclaimable() is used only when MAX_NUMNODES > 1, so move it into the compiler if statement [akpm@linux-foundation.org: clean up layout] Signed-off-by: Michele Curti Acked-by: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 998fb1756d43..dac81b975996 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1616,6 +1616,8 @@ static void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, NULL, "Memory cgroup out of memory"); } +#if MAX_NUMNODES > 1 + /** * test_mem_cgroup_node_reclaimable * @memcg: the target memcg @@ -1638,7 +1640,6 @@ static bool test_mem_cgroup_node_reclaimable(struct mem_cgroup *memcg, return false; } -#if MAX_NUMNODES > 1 /* * Always updating the nodemask is not very good - even if we have an empty