public inbox for [email protected]
 help / color / mirror / Atom feed
* [ammarfaizi2-block:google/android/kernel/common/android12-kiwi-5.10 9998/9999] mm/vmscan.c:673:15: warning: no previous prototype for function 'shrink_slab'
@ 2022-03-29  4:59 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-29  4:59 UTC (permalink / raw)
  To: Peifeng Li
  Cc: llvm, kbuild-all, GNU/Weeb Mailing List, linux-kernel, Todd Kjos

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-kiwi-5.10
head:   9c6bdae16301919fcab74129dee1083eba844952
commit: 71d560e017415ead361cfc10cc50ef36a0545cc2 [9998/9999] ANDROID: vendor_hooks: export shrink_slab
config: i386-randconfig-a012-20220328 (https://download.01.org/0day-ci/archive/20220329/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ammarfaizi2/linux-block/commit/71d560e017415ead361cfc10cc50ef36a0545cc2
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android12-kiwi-5.10
        git checkout 71d560e017415ead361cfc10cc50ef36a0545cc2
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> mm/vmscan.c:673:15: warning: no previous prototype for function 'shrink_slab' [-Wmissing-prototypes]
   unsigned long shrink_slab(gfp_t gfp_mask, int nid,
                 ^
   mm/vmscan.c:673:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   unsigned long shrink_slab(gfp_t gfp_mask, int nid,
   ^
   static 
   1 warning generated.


vim +/shrink_slab +673 mm/vmscan.c

   652	
   653	/**
   654	 * shrink_slab - shrink slab caches
   655	 * @gfp_mask: allocation context
   656	 * @nid: node whose slab caches to target
   657	 * @memcg: memory cgroup whose slab caches to target
   658	 * @priority: the reclaim priority
   659	 *
   660	 * Call the shrink functions to age shrinkable caches.
   661	 *
   662	 * @nid is passed along to shrinkers with SHRINKER_NUMA_AWARE set,
   663	 * unaware shrinkers will receive a node id of 0 instead.
   664	 *
   665	 * @memcg specifies the memory cgroup to target. Unaware shrinkers
   666	 * are called only if it is the root cgroup.
   667	 *
   668	 * @priority is sc->priority, we take the number of objects and >> by priority
   669	 * in order to get the scan target.
   670	 *
   671	 * Returns the number of reclaimed slab objects.
   672	 */
 > 673	unsigned long shrink_slab(gfp_t gfp_mask, int nid,
   674					 struct mem_cgroup *memcg,
   675					 int priority)
   676	{
   677		unsigned long ret, freed = 0;
   678		struct shrinker *shrinker;
   679		bool bypass = false;
   680	
   681		trace_android_vh_shrink_slab_bypass(gfp_mask, nid, memcg, priority, &bypass);
   682		if (bypass)
   683			return 0;
   684	
   685		/*
   686		 * The root memcg might be allocated even though memcg is disabled
   687		 * via "cgroup_disable=memory" boot parameter.  This could make
   688		 * mem_cgroup_is_root() return false, then just run memcg slab
   689		 * shrink, but skip global shrink.  This may result in premature
   690		 * oom.
   691		 */
   692		if (!mem_cgroup_disabled() && !mem_cgroup_is_root(memcg))
   693			return shrink_slab_memcg(gfp_mask, nid, memcg, priority);
   694	
   695		if (!down_read_trylock(&shrinker_rwsem))
   696			goto out;
   697	
   698		list_for_each_entry(shrinker, &shrinker_list, list) {
   699			struct shrink_control sc = {
   700				.gfp_mask = gfp_mask,
   701				.nid = nid,
   702				.memcg = memcg,
   703			};
   704	
   705			ret = do_shrink_slab(&sc, shrinker, priority);
   706			if (ret == SHRINK_EMPTY)
   707				ret = 0;
   708			freed += ret;
   709			/*
   710			 * Bail out if someone want to register a new shrinker to
   711			 * prevent the registration from being stalled for long periods
   712			 * by parallel ongoing shrinking.
   713			 */
   714			if (rwsem_is_contended(&shrinker_rwsem)) {
   715				freed = freed ? : 1;
   716				break;
   717			}
   718		}
   719	
   720		up_read(&shrinker_rwsem);
   721	out:
   722		cond_resched();
   723		return freed;
   724	}
   725	EXPORT_SYMBOL_GPL(shrink_slab);
   726	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-29  4:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-29  4:59 [ammarfaizi2-block:google/android/kernel/common/android12-kiwi-5.10 9998/9999] mm/vmscan.c:673:15: warning: no previous prototype for function 'shrink_slab' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox