lkml.org 
[lkml]   [2009]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] memcg: use ifdef for mem_cgroup_is_obsolete()
From: Pekka Enberg <penberg@cs.helsinki.fi>

When CONFIG_DEBUG_VM is disabled, I get the following warning:

CC mm/memcontrol.o
mm/memcontrol.c:318: warning: ‘mem_cgroup_is_obsolete’ defined but not
used

Fix that up by wrapping mem_cgroup_is_obsolete() in an ifdef.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
mm/memcontrol.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 01c2d8f..51f2dbd 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -314,12 +314,14 @@ static struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm)
return mem;
}

+#ifdef CONFIG_DEBUG_VM
static bool mem_cgroup_is_obsolete(struct mem_cgroup *mem)
{
if (!mem)
return true;
return css_is_removed(&mem->css);
}
+#endif


/*
--
1.5.6.3
\
 
 \ /
  Last update: 2009-05-15 12:27    [W:0.025 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site