Re: [PATCH v1] mm/shrinker: simplify shrinker_memcg_alloc() using guard()
From: wangxuewen
Date: Mon May 18 2026 - 21:34:40 EST
Hi all,
Thanks for the notice.
I have already removed the unused ret variable in my v2 patch to fix this compiler warning.This problem only exists in the old v1 version, and the v2 patch has fully resolved it.
v2 patch link:
https://lore.kernel.org/all/20260513075214.2655710-1-18810879172@xxxxxxx/
And this revised v2 has been merged into mm-new branch already.
Thanks,
Xuewen Wang
在 2026/5/19 8:36, Andrew Morton 写道:
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':
218 | int id, ret = -ENOMEM;mm/shrinker.c:218:17: warning: unused variable 'ret' [-Wunused-variable]
| ^~~
Something went wrong here - that patch *removes* this definition of
`ret'.
https://lore.kernel.org/20260513075214.2655710-1-18810879172@xxxxxxx