kernel/cgroup/cgroup.c:3029:24: warning: unused variable 'ss'
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-6.18 head: d8b269e009bbc471cb2735b5f737839495efce3b commit: d8b269e009bbc471cb2735b5f737839495efce3b [17/17] cgroup: Remove unused cgroup_subsys::post_attach config: i386-buildonly-randconfig-003-20250905 (https://download.01.org/0day-ci/archive/20250905/[email protected]/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250905/[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 >>):
>> kernel/cgroup/cgroup.c:3029:24: warning: unused variable 'ss' [-Wunused-variable]
3029 | struct cgroup_subsys *ss;
| ^~
>> kernel/cgroup/cgroup.c:3030:6: warning: unused variable 'ssid' [-Wunused-variable]
3030 | int ssid;
| ^~~~2 warnings generated.
vim +/ss +3029 kernel/cgroup/cgroup.c
bbcb81d09104f0 kernel/cgroup.c Paul Menage 2007-10-18 3026
4f7e7236435ca0 kernel/cgroup/cgroup.c Tejun Heo 2022-08-15 3027 void cgroup_procs_write_finish(struct task_struct *task, bool threadgroup_locked)
715c809d9a9e38 kernel/cgroup/cgroup.c Tejun Heo 2017-05-15 3028 {
715c809d9a9e38 kernel/cgroup/cgroup.c Tejun Heo 2017-05-15 @3029 struct cgroup_subsys *ss;
715c809d9a9e38 kernel/cgroup/cgroup.c Tejun Heo 2017-05-15 @3030 int ssid;
081aa458c38ba5 kernel/cgroup.c Li Zefan 2013-03-13 3031
715c809d9a9e38 kernel/cgroup/cgroup.c Tejun Heo 2017-05-15 3032 /* release reference from cgroup_procs_write_start() */
715c809d9a9e38 kernel/cgroup/cgroup.c Tejun Heo 2017-05-15 3033 put_task_struct(task);
3014dde762f618 kernel/cgroup.c Tejun Heo 2015-09-16 3034
4f7e7236435ca0 kernel/cgroup/cgroup.c Tejun Heo 2022-08-15 3035 cgroup_attach_unlock(threadgroup_locked);
af351026aafc8d kernel/cgroup.c Paul Menage 2008-07-25 3036 }
af351026aafc8d kernel/cgroup.c Paul Menage 2008-07-25 3037 :::::: The code at line 3029 was first introduced by commit
:::::: 715c809d9a9e38d8fb9476757ddaf64c1a9f767f cgroup: reorganize cgroup.procs / task write path
:::::: TO: Tejun Heo <[email protected]>
:::::: CC: Tejun Heo <[email protected]>
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Tejun Heo
maintainerPATCH 1/1 cgroup: Remove unused local variables from cgroup_procs_write_finish()
From 222f83d5ab86344010f9e121799202b9ab25375b Mon Sep 17 00:00:00 2001
From: Tejun Heo <[email protected]>
Date: Thu, 4 Sep 2025 11:23:43 -1000
d8b269e009bb ("cgroup: Remove unused cgroup_subsys::post_attach") made $ss and $ssid unused but didn't drop them leading to compilation warnings. Drop them.
---
Applied to cgroup/for-6.18.
Thanks.
kernel/cgroup/cgroup.c | 3 --- 1 file changed, 3 deletions(-)
kernel/cgroup/cgroup.c +0 -3
@@ -3026,9 +3026,6 @@ struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,void cgroup_procs_write_finish (struct task_struct *task,bool threadgroup_locked) { -struct cgroup_subsys *ss; -int ssid; -/* release reference from cgroup_procs_write_start() */ put_task_struct (task);
Signature · 1 line
2.51.0
kernel test robot
build botRe: [PATCH cgroup/for-6.18] cgroup: Remove unused local variables from cgroup_procs_write_finish()
kernel test robot noticed the following build errors:
Hi Tejun,
kernel test robot noticed the following build errors:
[auto build test ERROR on v6.17-rc4]
[also build test ERROR on linus/master]
[cannot apply to tj-cgroup/for-next next-20250905]
[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/Tejun-Heo/cgroup-Remove-unused-local-variables-from-cgroup_procs_write_finish/20250905-052843 base: v6.17-rc4 patch link: https://lore.kernel.org/r/aLoEE9o-DKeVo1id%40slm.duckdns.org patch subject: [PATCH cgroup/for-6.18] cgroup: Remove unused local variables from cgroup_procs_write_finish() config: csky-randconfig-002-20250905 (https://download.01.org/0day-ci/archive/20250905/[email protected]/config) compiler: csky-linux-gcc (GCC) 13.4.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250905/[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 errors (new ones prefixed by >>):
In file included from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_procs_write_finish':
>> kernel/cgroup/cgroup.c:3034:29: error: 'ssid' undeclared (first use in this function)
3034 | for_each_subsys(ss, ssid)
| ^~~~
kernel/cgroup/cgroup-internal.h:184:15: note: in definition of macro 'for_each_subsys'
184 | for ((ssid) = 0; (ssid) < CGROUP_SUBSYS_COUNT && \
| ^~~~
kernel/cgroup/cgroup.c:3034:29: note: each undeclared identifier is reported only once for each function it appears in
3034 | for_each_subsys(ss, ssid)
| ^~~~
kernel/cgroup/cgroup-internal.h:184:15: note: in definition of macro 'for_each_subsys'
184 | for ((ssid) = 0; (ssid) < CGROUP_SUBSYS_COUNT && \
| ^~~~
>> kernel/cgroup/cgroup.c:3034:25: error: 'ss' undeclared (first use in this function); did you mean 's8'?
3034 | for_each_subsys(ss, ssid)
| ^~
kernel/cgroup/cgroup-internal.h:185:17: note: in definition of macro 'for_each_subsys'
185 | (((ss) = cgroup_subsys[ssid]) || true); (ssid)++)
| ^~vim +/ssid +3034 kernel/cgroup/cgroup.c
bbcb81d09104f0 kernel/cgroup.c Paul Menage 2007-10-18 3026
4f7e7236435ca0 kernel/cgroup/cgroup.c Tejun Heo 2022-08-15 3027 void cgroup_procs_write_finish(struct task_struct *task, bool threadgroup_locked)
715c809d9a9e38 kernel/cgroup/cgroup.c Tejun Heo 2017-05-15 3028 {
715c809d9a9e38 kernel/cgroup/cgroup.c Tejun Heo 2017-05-15 3029 /* release reference from cgroup_procs_write_start() */
715c809d9a9e38 kernel/cgroup/cgroup.c Tejun Heo 2017-05-15 3030 put_task_struct(task);
3014dde762f618 kernel/cgroup.c Tejun Heo 2015-09-16 3031
4f7e7236435ca0 kernel/cgroup/cgroup.c Tejun Heo 2022-08-15 3032 cgroup_attach_unlock(threadgroup_locked);
4f7e7236435ca0 kernel/cgroup/cgroup.c Tejun Heo 2022-08-15 3033
5cf1cacb49aee3 kernel/cgroup.c Tejun Heo 2016-04-21 @3034 for_each_subsys(ss, ssid)
5cf1cacb49aee3 kernel/cgroup.c Tejun Heo 2016-04-21 3035 if (ss->post_attach)
5cf1cacb49aee3 kernel/cgroup.c Tejun Heo 2016-04-21 3036 ss->post_attach();
af351026aafc8d kernel/cgroup.c Paul Menage 2008-07-25 3037 }
af351026aafc8d kernel/cgroup.c Paul Menage 2008-07-25 3038 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki