drivers/irqchip/irq-ompic.c:83:1: sparse: sparse: symbol '__pcpu_scope_ops' was not declared. Should it be static?

From: kernel test robot
Date: Tue Dec 12 2023 - 13:13:53 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26aff849438cebcd05f1a647390c4aa700d5c0f1
commit: 8e6d08e0a15e7d4d4b608b56597350d4cdd77710 openrisc: initial SMP support
date: 6 years ago
config: openrisc-randconfig-r122-20231111 (https://download.01.org/0day-ci/archive/20231213/202312130224.3JuJk7LB-lkp@xxxxxxxxx/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231213/202312130224.3JuJk7LB-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/202312130224.3JuJk7LB-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/irqchip/irq-ompic.c:83:1: sparse: sparse: symbol '__pcpu_scope_ops' was not declared. Should it be static?
drivers/irqchip/irq-ompic.c:198:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] <asn:2> *static [assigned] [toplevel] ompic_base @@
drivers/irqchip/irq-ompic.c:198:17: sparse: expected void *addr
drivers/irqchip/irq-ompic.c:198:17: sparse: got void [noderef] <asn:2> *static [assigned] [toplevel] ompic_base
In file included from include/linux/workqueue.h:8,
from include/linux/mm_types.h:15,
from include/asm-generic/pgtable.h:9,
from arch/openrisc/include/asm/pgtable.h:444,
from arch/openrisc/include/asm/io.h:33,
from include/linux/io.h:25,
from drivers/irqchip/irq-ompic.c:61:
include/linux/timer.h: In function 'timer_setup':
include/linux/timer.h:178:30: warning: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Wcast-function-type]
178 | __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
| ^
include/linux/timer.h:143:39: note: in definition of macro '__setup_timer'
143 | (_timer)->function = (_fn); 18- | ^~~

vim +/__pcpu_scope_ops +83 drivers/irqchip/irq-ompic.c

9b54470afd8362 Stafford Horne 2017-10-30 82
9b54470afd8362 Stafford Horne 2017-10-30 @83 DEFINE_PER_CPU(unsigned long, ops);
9b54470afd8362 Stafford Horne 2017-10-30 84

:::::: The code at line 83 was first introduced by commit
:::::: 9b54470afd836278a7e6f0f08194e2e2dca4b6eb irqchip: add initial support for ompic

:::::: TO: Stafford Horne <shorne@xxxxxxxxx>
:::::: CC: Stafford Horne <shorne@xxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki