Re: [PATCH 2/4] cgroup: Introduce cgroup_level() helper
From: kernel test robot <hidden>
Date: 2025-12-20 21:49:53
Also in:
bpf, cgroups, linux-block, linux-trace-kernel, lkml, netfilter-devel, oe-kbuild-all
Hi Michal, kernel test robot noticed the following build errors: [auto build test ERROR on 8f0b4cce4481fb22653697cced8d0d04027cb1e8] url: https://github.com/intel-lab-lkp/linux/commits/Michal-Koutn/cgroup-Eliminate-cgrp_ancestor_storage-in-cgroup_root/20251218-004346 base: 8f0b4cce4481fb22653697cced8d0d04027cb1e8 patch link: https://lore.kernel.org/r/20251217162744.352391-3-mkoutny%40suse.com patch subject: [PATCH 2/4] cgroup: Introduce cgroup_level() helper config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20251221/202512210532.ziNaxDJf-lkp@intel.com/config) compiler: nios2-linux-gcc (GCC) 11.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251221/202512210532.ziNaxDJf-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 [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202512210532.ziNaxDJf-lkp@intel.com/ (local) All error/warnings (new ones prefixed by >>): block/blk-iocost.c: In function 'ioc_pd_init':
quoted
block/blk-iocost.c:3006:60: error: expected ';' before 'for'
3006 | iocg->level = cgroup_level(blkg->blkcg->css.cgroup)
| ^
| ;
3007 |
3008 | for (tblkg = blkg; tblkg; tblkg = tblkg->parent) {
| ~~~ quoted
block/blk-iocost.c:2988:26: warning: unused variable 'tblkg' [-Wunused-variable]
2988 | struct blkcg_gq *tblkg;
| ^~~~~
vim +3006 block/blk-iocost.c
2981
2982 static void ioc_pd_init(struct blkg_policy_data *pd)
2983 {
2984 struct ioc_gq *iocg = pd_to_iocg(pd);
2985 struct blkcg_gq *blkg = pd_to_blkg(&iocg->pd);
2986 struct ioc *ioc = q_to_ioc(blkg->q);
2987 struct ioc_now now;2988 struct blkcg_gq *tblkg;
2989 unsigned long flags; 2990 2991 ioc_now(ioc, &now); 2992 2993 iocg->ioc = ioc; 2994 atomic64_set(&iocg->vtime, now.vnow); 2995 atomic64_set(&iocg->done_vtime, now.vnow); 2996 atomic64_set(&iocg->active_period, atomic64_read(&ioc->cur_period)); 2997 INIT_LIST_HEAD(&iocg->active_list); 2998 INIT_LIST_HEAD(&iocg->walk_list); 2999 INIT_LIST_HEAD(&iocg->surplus_list); 3000 iocg->hweight_active = WEIGHT_ONE; 3001 iocg->hweight_inuse = WEIGHT_ONE; 3002 3003 init_waitqueue_head(&iocg->waitq); 3004 hrtimer_setup(&iocg->waitq_timer, iocg_waitq_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 3005
3006 iocg->level = cgroup_level(blkg->blkcg->css.cgroup)
3007
3008 for (tblkg = blkg; tblkg; tblkg = tblkg->parent) {
3009 struct ioc_gq *tiocg = blkg_to_iocg(tblkg);
3010 iocg->ancestors[tiocg->level] = tiocg;
3011 }
3012
3013 spin_lock_irqsave(&ioc->lock, flags);
3014 weight_updated(iocg, &now);
3015 spin_unlock_irqrestore(&ioc->lock, flags);
3016 }
3017
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki