Re: [PATCH] workqueue: fix invalid cpu in kick_pool
From: kernel test robot
Date: Mon Nov 20 2023 - 16:01:56 EST
Hi Yong,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tj-wq/for-next]
[also build test WARNING on linus/master v6.7-rc2 next-20231120]
[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/Yong-He/workqueue-fix-invalid-cpu-in-kick_pool/20231120-201849
base: https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link: https://lore.kernel.org/r/20231120121623.119780-1-alexyonghe%40tencent.com
patch subject: [PATCH] workqueue: fix invalid cpu in kick_pool
config: arc-randconfig-001-20231121 (https://download.01.org/0day-ci/archive/20231121/202311210443.gdbUH0vN-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231121/202311210443.gdbUH0vN-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/202311210443.gdbUH0vN-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
kernel/workqueue.c: In function 'kick_pool':
>> kernel/workqueue.c:1109:13: warning: unused variable 'cpu' [-Wunused-variable]
1109 | int cpu;
| ^~~
vim +/cpu +1109 kernel/workqueue.c
1097
1098 /**
1099 * kick_pool - wake up an idle worker if necessary
1100 * @pool: pool to kick
1101 *
1102 * @pool may have pending work items. Wake up worker if necessary. Returns
1103 * whether a worker was woken up.
1104 */
1105 static bool kick_pool(struct worker_pool *pool)
1106 {
1107 struct worker *worker = first_idle_worker(pool);
1108 struct task_struct *p;
> 1109 int cpu;
1110
1111 lockdep_assert_held(&pool->lock);
1112
1113 if (!need_more_worker(pool) || !worker)
1114 return false;
1115
1116 p = worker->task;
1117
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki