Re: [PATCH v1] mm/shrinker: simplify shrinker_memcg_alloc() using guard()
From: Andrew Morton
Date: Mon May 18 2026 - 20:36:21 EST
On Fri, 15 May 2026 11:15:40 +0800 kernel test robot <lkp@xxxxxxxxx> wrote:
> Hi wangxuewen,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on v7.1-rc3]
> [also build test WARNING on linus/master next-20260508]
> [cannot apply to akpm-mm/mm-everything]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/wangxuewen/mm-shrinker-simplify-shrinker_memcg_alloc-using-guard/20260515-014803
> base: v7.1-rc3
> patch link: https://lore.kernel.org/r/20260512085546.368911-1-18810879172%40163.com
> patch subject: [PATCH v1] mm/shrinker: simplify shrinker_memcg_alloc() using guard()
> config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20260515/202605151100.lH0pRo2I-lkp@xxxxxxxxx/config)
> compiler: sh4-linux-gcc (GCC) 15.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260515/202605151100.lH0pRo2I-lkp@xxxxxxxxx/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202605151100.lH0pRo2I-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
> mm/shrinker.c: In function 'shrinker_memcg_alloc':
> >> mm/shrinker.c:218:17: warning: unused variable 'ret' [-Wunused-variable]
> 218 | int id, ret = -ENOMEM;
> | ^~~
Something went wrong here - that patch *removes* this definition of
`ret'.
https://lore.kernel.org/20260513075214.2655710-1-18810879172@xxxxxxx