kernel/workqueue.c:5848:12: warning: 'workqueue_set_unbound_cpumask' defined but not used
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next head: e76d28bdf9ba5388b8c4835a5199dc427b603188 commit: fe28f631fa941fba583d1c4f25895284b90af671 [7/11] workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask config: i386-tinyconfig (https://download.01.org/0day-ci/archive/20231113/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231113/[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/workqueue.c:5848:12: warning: 'workqueue_set_unbound_cpumask' defined but not used [-Wunused-function]
5848 | static int workqueue_set_unbound_cpumask(cpumask_var_t cpumask)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/workqueue_set_unbound_cpumask +5848 kernel/workqueue.c
5835
5836 /**
5837 * workqueue_set_unbound_cpumask - Set the low-level unbound cpumask
5838 * @cpumask: the cpumask to set
5839 *
5840 * The low-level workqueues cpumask is a global cpumask that limits 5841 * the affinity of all unbound workqueues. This function check the @cpumask 5842 * and apply it to all unbound workqueues and updates all pwqs of them. 5843 * 5844 * Return: 0 - Success 5845 * -EINVAL - Invalid @cpumask 5846 * -ENOMEM - Failed to allocate memory for attrs or pwqs. 5847 */ > 5848 static int workqueue_set_unbound_cpumask(cpumask_var_t cpumask)
5849 {
5850 int ret = -EINVAL;
5851
5852 /*
5853 * Not excluding isolated cpus on purpose.
5854 * If the user wishes to include them, we allow that.
5855 */
5856 cpumask_and(cpumask, cpumask, cpu_possible_mask);
5857 if (!cpumask_empty(cpumask)) {
5858 apply_wqattrs_lock();
5859 cpumask_copy(wq_requested_unbound_cpumask, cpumask);
5860 if (cpumask_equal(cpumask, wq_unbound_cpumask)) {
5861 ret = 0;
5862 goto out_unlock;
5863 }
5864
5865 ret = workqueue_apply_unbound_cpumask(cpumask);
5866
5867 out_unlock:
5868 apply_wqattrs_unlock();
5869 }
5870
5871 return ret;
5872 }
5873
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki