arch/powerpc/kernel/tau_6xx.c:199:1: sparse: sparse: symbol 'tau_work' was not declared. Should it be static?

From: kernel test robot
Date: Wed Aug 18 2021 - 14:38:58 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 614cb2751d3150850d459bee596c397f344a7936
commit: b1c6a0a10bfaf36ec82fde6f621da72407fa60a1 powerpc/tau: Convert from timer to workqueue
date: 11 months ago
config: powerpc-randconfig-s032-20210818 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b1c6a0a10bfaf36ec82fde6f621da72407fa60a1
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b1c6a0a10bfaf36ec82fde6f621da72407fa60a1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/kernel/

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


sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kernel/tau_6xx.c:199:1: sparse: sparse: symbol 'tau_work' was not declared. Should it be static?

vim +/tau_work +199 arch/powerpc/kernel/tau_6xx.c

189
190 static int __init TAU_init(void)
191 {
192 /* We assume in SMP that if one CPU has TAU support, they
193 * all have it --BenH
194 */
195 if (!cpu_has_feature(CPU_FTR_TAU)) {
196 printk("Thermal assist unit not available\n");
197 tau_initialized = 0;
198 return 1;
> 199 }
200
201 tau_int_enable = IS_ENABLED(CONFIG_TAU_INT) &&
202 !strcmp(cur_cpu_spec->platform, "ppc750");
203
204 tau_workq = alloc_workqueue("tau", WQ_UNBOUND, 1);
205 if (!tau_workq)
206 return -ENOMEM;
207
208 on_each_cpu(TAU_init_smp, NULL, 0);
209
210 queue_work(tau_workq, &tau_work);
211
212 pr_info("Thermal assist unit using %s, shrink_timer: %d ms\n",
213 tau_int_enable ? "interrupts" : "workqueue", shrink_timer);
214 tau_initialized = 1;
215
216 return 0;
217 }
218

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip