[vbabka:objext_split-v3-bench 7/20] mm/slub.c:9389:72: warning: parameter 'si' set but not used
kernel test robot <[email protected]> Tue, 04 Aug 2026 05:13:27 +0800
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git objext_split-v3-bench head: 00a963c6f8935eea26a26878ee6ddeedb456d5ba commit: bef53663aa280f0a087ff3e10344c5734cf357da [7/20] slub_kunit: sheaves microbenchmark config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260804/[email protected]/config) compiler: alpha-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): In file included from include/asm-generic/percpu.h:9, from arch/alpha/include/asm/percpu.h:16, from include/linux/irqflags.h:19, from include/linux/spinlock.h:59, from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/mm.h:8, from mm/slub.c:15: mm/slub.c: In function 'get_stat_sum': mm/slub.c:9395:40: error: 'struct kmem_cache' has no member named 'cpu_slab'; did you mean 'cpu_stats'? 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~ include/linux/percpu-defs.h:221:54: note: in definition of macro '__verify_pcpu_ptr' 221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \ | ^~~ mm/slub.c:9395:25: note: in expansion of macro 'per_cpu_ptr' 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~~~~ In file included from include/linux/compiler_types.h:173, from <command-line>: mm/slub.c:9395:40: error: 'struct kmem_cache' has no member named 'cpu_slab'; did you mean 'cpu_stats'? 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~ include/linux/compiler-gcc.h:34:41: note: in definition of macro 'RELOC_HIDE' 34 | __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ | ^~~ include/linux/percpu-defs.h:226:10: note: in expansion of macro 'TYPEOF_UNQUAL' 226 | (TYPEOF_UNQUAL(*(__p)) __force __kernel *)((__force unsigned long)(__p)) | ^~~~~~~~~~~~~ include/linux/percpu-defs.h:235:20: note: in expansion of macro 'PERCPU_PTR' 235 | RELOC_HIDE(PERCPU_PTR(__p), (__offset)) | ^~~~~~~~~~ include/linux/percpu-defs.h:240:9: note: in expansion of macro 'SHIFT_PERCPU_PTR' 240 | SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))); \ | ^~~~~~~~~~~~~~~~ mm/slub.c:9395:25: note: in expansion of macro 'per_cpu_ptr' 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~~~~ mm/slub.c:9395:40: error: 'struct kmem_cache' has no member named 'cpu_slab'; did you mean 'cpu_stats'? 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~ include/linux/compiler-gcc.h:34:41: note: in definition of macro 'RELOC_HIDE' 34 | __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ | ^~~ include/linux/percpu-defs.h:235:20: note: in expansion of macro 'PERCPU_PTR' 235 | RELOC_HIDE(PERCPU_PTR(__p), (__offset)) | ^~~~~~~~~~ include/linux/percpu-defs.h:240:9: note: in expansion of macro 'SHIFT_PERCPU_PTR' 240 | SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))); \ | ^~~~~~~~~~~~~~~~ mm/slub.c:9395:25: note: in expansion of macro 'per_cpu_ptr' 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~~~~ mm/slub.c:9395:40: error: 'struct kmem_cache' has no member named 'cpu_slab'; did you mean 'cpu_stats'? 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~ include/linux/compiler-gcc.h:35:17: note: in definition of macro 'RELOC_HIDE' 35 | (typeof(ptr)) (__ptr + (off)); \ | ^~~ include/linux/percpu-defs.h:226:10: note: in expansion of macro 'TYPEOF_UNQUAL' 226 | (TYPEOF_UNQUAL(*(__p)) __force __kernel *)((__force unsigned long)(__p)) | ^~~~~~~~~~~~~ include/linux/percpu-defs.h:235:20: note: in expansion of macro 'PERCPU_PTR' 235 | RELOC_HIDE(PERCPU_PTR(__p), (__offset)) | ^~~~~~~~~~ include/linux/percpu-defs.h:240:9: note: in expansion of macro 'SHIFT_PERCPU_PTR' 240 | SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))); \ | ^~~~~~~~~~~~~~~~ mm/slub.c:9395:25: note: in expansion of macro 'per_cpu_ptr' 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~~~~ mm/slub.c:9395:40: error: 'struct kmem_cache' has no member named 'cpu_slab'; did you mean 'cpu_stats'? 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~ include/linux/compiler-gcc.h:35:17: note: in definition of macro 'RELOC_HIDE' 35 | (typeof(ptr)) (__ptr + (off)); \ | ^~~ include/linux/percpu-defs.h:235:20: note: in expansion of macro 'PERCPU_PTR' 235 | RELOC_HIDE(PERCPU_PTR(__p), (__offset)) | ^~~~~~~~~~ include/linux/percpu-defs.h:240:9: note: in expansion of macro 'SHIFT_PERCPU_PTR' 240 | SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))); \ | ^~~~~~~~~~~~~~~~ mm/slub.c:9395:25: note: in expansion of macro 'per_cpu_ptr' 9395 | sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; | ^~~~~~~~~~~ >> mm/slub.c:9389:72: warning: parameter 'si' set but not used [-Wunused-but-set-parameter=] 9389 | static unsigned long get_stat_sum(struct kmem_cache *s, enum stat_item si) | ~~~~~~~~~~~~~~~^~ -- lib/tests/slub_kunit.c: In function 'test_bench': >> lib/tests/slub_kunit.c:457:28: warning: variable 'base' set but not used [-Wunused-but-set-variable=] 457 | unsigned long long base; | ^~~~ vim +/si +9389 mm/slub.c 9388 > 9389 static unsigned long get_stat_sum(struct kmem_cache *s, enum stat_item si) 9390 { 9391 unsigned long sum = 0; 9392 int cpu; 9393 9394 for_each_online_cpu(cpu) { 9395 sum += per_cpu_ptr(s->cpu_slab, cpu)->stat[si]; 9396 } 9397 9398 return sum; 9399 } 9400 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki