arch/mips/loongson64/smp.c:56:6: sparse: sparse: symbol 'ipi_write_enable' was not declared. Should it be static?

From: kernel test robot
Date: Thu May 27 2021 - 04:06:56 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d7c5303fbc8ac874ae3e597a5a0d3707dc0230b4
commit: fed4955f304eb62acfdf86ecf05ea164856e09d8 MIPS: Loongson64: Add Mail_Send support for 3A4000+ CPU
date: 7 months ago
config: mips-randconfig-s032-20210527 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.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-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fed4955f304eb62acfdf86ecf05ea164856e09d8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout fed4955f304eb62acfdf86ecf05ea164856e09d8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=mips

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


sparse warnings: (new ones prefixed by >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
arch/mips/loongson64/smp.c:54:5: sparse: sparse: symbol 'ipi_read_clear' was not declared. Should it be static?
arch/mips/loongson64/smp.c:55:6: sparse: sparse: symbol 'ipi_write_action' was not declared. Should it be static?
>> arch/mips/loongson64/smp.c:56:6: sparse: sparse: symbol 'ipi_write_enable' was not declared. Should it be static?
>> arch/mips/loongson64/smp.c:57:6: sparse: sparse: symbol 'ipi_clear_buf' was not declared. Should it be static?
>> arch/mips/loongson64/smp.c:58:6: sparse: sparse: symbol 'ipi_write_buf' was not declared. Should it be static?
arch/mips/loongson64/smp.c:139:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:139:18: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:139:18: sparse: got void *
arch/mips/loongson64/smp.c:141:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:141:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:141:9: sparse: got void *
arch/mips/loongson64/smp.c:148:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:148:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:148:9: sparse: got void *
arch/mips/loongson64/smp.c:153:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:153:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:153:9: sparse: got void *
arch/mips/loongson64/smp.c:158:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:158:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:158:9: sparse: got void *
arch/mips/loongson64/smp.c:174:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:174:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:174:9: sparse: got void *
arch/mips/loongson64/smp.c:176:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:176:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:176:9: sparse: got void *
arch/mips/loongson64/smp.c:178:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:178:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:178:9: sparse: got void *
arch/mips/loongson64/smp.c:180:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/loongson64/smp.c:180:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/loongson64/smp.c:180:9: sparse: got void *

vim +/ipi_write_enable +56 arch/mips/loongson64/smp.c

36
37 /* read a 32bit value from ipi register */
38 #define loongson3_ipi_read32(addr) readl(addr)
39 /* read a 64bit value from ipi register */
40 #define loongson3_ipi_read64(addr) readq(addr)
41 /* write a 32bit value to ipi register */
42 #define loongson3_ipi_write32(action, addr) \
43 do { \
44 writel(action, addr); \
45 __wbflush(); \
46 } while (0)
47 /* write a 64bit value to ipi register */
48 #define loongson3_ipi_write64(action, addr) \
49 do { \
50 writeq(action, addr); \
51 __wbflush(); \
52 } while (0)
53
54 u32 (*ipi_read_clear)(int cpu);
55 void (*ipi_write_action)(int cpu, u32 action);
> 56 void (*ipi_write_enable)(int cpu);
> 57 void (*ipi_clear_buf)(int cpu);
> 58 void (*ipi_write_buf)(int cpu, struct task_struct *idle);
59

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

Attachment: .config.gz
Description: application/gzip