Re: [PATCH v3 07/11] smp: eliminate smp_call_function_any

kernel test robot
2022-05-18T19:39:58Z

Hi Donghai,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on linus/master v5.18-rc7]
[cannot apply to tip/x86/core powerpc/next next-20220518]
[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]

url: https://github.com/intel-lab-lkp/linux/commits/Donghai-Qiao/smp-cross-CPU-call-interface/20220518-020728
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220519/202205190310.ZNhT85tE-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/9ccc00bf617be7b23dca37d3a7d845165c365725
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Donghai-Qiao/smp-cross-CPU-call-interface/20220518-020728
git checkout 9ccc00bf617be7b23dca37d3a7d845165c365725
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> kernel/smp.c:1033: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Given cpumask, find an online CPU as close to the local CPU as

vim +1033 kernel/smp.c

1031
1032 /**
> 1033 * Given cpumask, find an online CPU as close to the local CPU as
1034 * possible in the order below:
1035 *
1036 * - The first pick is the local CPU if it is present in cpumask.
1037 * - The second pick is a CPU located in the same node of the
1038 * local CPU and it is also present in cpumask.
1039 * - The Third pick is any online CPU which is also in cpumask.
1040 *
1041 * The callers should disable preemption when using this function.
1042 */
1043 int __smp_cpu_nearby(const struct cpumask *mask)
1044 {
1045 int cpu;
1046 const struct cpumask *nodemask;
1047
1048 cpu = smp_processor_id();
1049 if (cpumask_test_cpu(cpu, mask))
1050 return cpu;
1051
1052 /* Any CPU in the same node */
1053 nodemask = cpumask_of_node(cpu_to_node(cpu));
1054 for (cpu = cpumask_first_and(nodemask, mask); cpu < nr_cpu_ids;
1055 cpu = cpumask_next_and(cpu, nodemask, mask)) {
1056 if (cpu_online(cpu))
1057 return cpu;
1058 }
1059
1060 /* Any online CPU will do */
1061 cpu = cpumask_any_and(mask, cpu_online_mask);
1062 return cpu;
1063 }
1064 EXPORT_SYMBOL(__smp_cpu_nearby);
1065

--
0-DAY CI Kernel Test Service