From: kernel test robot <lkp@intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: oe-kbuild-all@lists.linux.dev,
"Vlastimil Babka (SUSE)" <vbabka@kernel.org>
Subject: [vbabka:objext_split-v3-bench 7/20] mm/slub.c:9389:72: warning: parameter 'si' set but not used
Date: Tue, 04 Aug 2026 05:13:27 +0800 [thread overview]
Message-ID: <202608040412.uHCMpAwJ-lkp@intel.com> (raw)
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/202608040412.uHCMpAwJ-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/202608040412.uHCMpAwJ-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608040412.uHCMpAwJ-lkp@intel.com/
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
reply other threads:[~2026-08-03 21:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202608040412.uHCMpAwJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=vbabka@kernel.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox