On Thu, Nov 06, 2014 at 09:16:02AM +0800, kbuild test robot wrote: > tree: git://git.cmpxchg.org/linux-mmotm.git master > head: 4873e01c1a932866e01a6ecd91b39d45a8efd8e7 > commit: 9f3ee6d5fef72724587d8934583b3994679c4e40 [143/283] slab: recharge slab pages to the allocating memory cgroup > config: sh-titan_defconfig (attached as .config) > reproduce: > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > git checkout 9f3ee6d5fef72724587d8934583b3994679c4e40 > # save the attached .config to linux build tree > make.cross ARCH=sh > > All error/warnings: > > mm/slab.c: In function 'slab_alloc': > >> mm/slab.c:3260:4: error: implicit declaration of function 'slab_free' [-Werror=implicit-function-declaration] > mm/slab.c: At top level: > >> mm/slab.c:3534:122: warning: conflicting types for 'slab_free' [enabled by default] > >> mm/slab.c:3534:122: error: static declaration of 'slab_free' follows non-static declaration > mm/slab.c:3260:4: note: previous implicit declaration of 'slab_free' was here > cc1: some warnings being treated as errors > > vim +/slab_free +3260 mm/slab.c > > 3254 > 3255 if (likely(objp)) { > 3256 kmemcheck_slab_alloc(cachep, flags, objp, cachep->object_size); > 3257 if (unlikely(flags & __GFP_ZERO)) > 3258 memset(objp, 0, cachep->object_size); > 3259 if (unlikely(memcg_kmem_recharge_slab(objp, flags))) { > > 3260 slab_free(cachep, objp); > 3261 objp = NULL; > 3262 } > 3263 } Oops, I placed the forward declaration of slab_free under CONFIG_NUMA. Sorry :-( The fix would be: diff --git a/mm/slab.c b/mm/slab.c index 61b01c2ae1d9..00cd028404cb 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -2961,6 +2961,8 @@ out: return objp; } +static __always_inline void slab_free(struct kmem_cache *cachep, void *objp); + #ifdef CONFIG_NUMA /* * Try allocating on another node if PFA_SPREAD_SLAB is a mempolicy is set. @@ -3133,8 +3135,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) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>