From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: cl@linux.com, penberg@kernel.org, rientjes@google.com,
iamjoonsoo.kim@lge.com, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, vdavydov@parallels.com
Subject: [PATCH] slab: Fix compilation error in case of !CONFIG_NUMA
Date: Mon, 10 Nov 2014 09:11:57 +0200 [thread overview]
Message-ID: <1415603517-9527-1-git-send-email-peter.ujfalusi@ti.com> (raw)
Move the definition of slab_free() outside of #ifdef CONFIG_NUMA since it
is used by code which is not NUMA specific. Fixes the following error
introduced by the following commit:
5da1c3c725ab slab: recharge slab pages to the allocating memory cgroup
CC mm/slab.o
/home/ZZZZZ/linux/mm/slab.c: In function a??slab_alloca??:
/home/ZZZZZ/linux/mm/slab.c:3260:4: error: implicit declaration of function a??slab_freea?? [-Werror=implicit-function-declaration]
slab_free(cachep, objp);
^
/home/ZZZZZ/linux/mm/slab.c: At top level:
/home/ZZZZZ/linux/mm/slab.c:3534:29: warning: conflicting types for a??slab_freea?? [enabled by default]
static __always_inline void slab_free(struct kmem_cache *cachep, void *objp)
^
/home/ZZZZZ/linux/mm/slab.c:3534:29: error: static declaration of a??slab_freea?? follows non-static declaration
/home/ZZZZZ/linux/mm/slab.c:3260:4: note: previous implicit declaration of a??slab_freea?? was here
slab_free(cachep, objp);
^
cc1: some warnings being treated as errors
/home/ZZZZZ/linux/scripts/Makefile.build:257: recipe for target 'mm/slab.o' failed
make[2]: *** [mm/slab.o] Error 1
/home/ZZZZZ/linux/Makefile:953: recipe for target 'mm' failed
make[1]: *** [mm] Error 2
make[1]: *** Waiting for unfinished jobs....
CHK kernel/config_data.h
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
mm/slab.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 61b01c2ae1d9..301ede1c6784 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3133,8 +3133,6 @@ done:
return obj;
}
-static __always_inline void slab_free(struct kmem_cache *cachep, void *objp);
-
static __always_inline void *
slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
unsigned long caller)
@@ -3228,6 +3226,8 @@ __do_cache_alloc(struct kmem_cache *cachep, gfp_t flags)
#endif /* CONFIG_NUMA */
+static __always_inline void slab_free(struct kmem_cache *cachep, void *objp);
+
static __always_inline void *
slab_alloc(struct kmem_cache *cachep, gfp_t flags, unsigned long caller)
{
--
2.1.3
--
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>
reply other threads:[~2014-11-10 7:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1415603517-9527-1-git-send-email-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=vdavydov@parallels.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox