[arm-platforms:hack/ppi 25/25] kernel/irq/manage.c:2466:47: error: initialization of 'struct irq_action *' from incompatible pointer type 'struct irqaction **'
kernel test robot
lkp at intel.com
Thu Jul 31 21:02:39 PDT 2025
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/ppi
head: 8a3b504aca25e8c9a274cb563d63a6b9454b2780
commit: 8a3b504aca25e8c9a274cb563d63a6b9454b2780 [25/25] WIP
config: i386-buildonly-randconfig-002-20250801 (https://download.01.org/0day-ci/archive/20250801/202508011246.xuBfT6Ao-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250801/202508011246.xuBfT6Ao-lkp@intel.com/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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508011246.xuBfT6Ao-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> kernel/irq/manage.c:2453:5: warning: no previous prototype for 'add_percpu_irq_target' [-Wmissing-prototypes]
2453 | int add_percpu_irq_target(unsigned int irq, void __percpu *dev_id)
| ^~~~~~~~~~~~~~~~~~~~~
kernel/irq/manage.c: In function 'add_percpu_irq_target':
>> kernel/irq/manage.c:2466:47: error: initialization of 'struct irq_action *' from incompatible pointer type 'struct irqaction **' [-Werror=incompatible-pointer-types]
2466 | for (struct irq_action *tmp = &desc->action; tmp; tmp = tmp->next) {
| ^
>> kernel/irq/manage.c:2466:76: error: invalid use of undefined type 'struct irq_action'
2466 | for (struct irq_action *tmp = &desc->action; tmp; tmp = tmp->next) {
| ^~
kernel/irq/manage.c:2467:69: error: invalid use of undefined type 'struct irq_action'
2467 | if (cpumask_test_cpu(smp_processor_id(), tmp->affinity))
| ^~
kernel/irq/manage.c:2470:32: error: invalid use of undefined type 'struct irq_action'
2470 | if (tmp->percpu_dev_id == dev_id)
| ^~
kernel/irq/manage.c:2474:59: error: invalid use of undefined type 'struct irq_action'
2474 | cpumask_set_cpu(smp_processor_id(), action->affinity);
| ^~
kernel/irq/manage.c:2477:42: error: invalid use of undefined type 'struct irq_action'
2477 | if (cpumask_weight(action->affinity) == nr_possible_cpus())
| ^~
>> kernel/irq/manage.c:2477:57: error: implicit declaration of function 'nr_possible_cpus'; did you mean 'num_possible_cpus'? [-Werror=implicit-function-declaration]
2477 | if (cpumask_weight(action->affinity) == nr_possible_cpus())
| ^~~~~~~~~~~~~~~~
| num_possible_cpus
kernel/irq/manage.c:2478:31: error: invalid use of undefined type 'struct irq_action'
2478 | action->flags &= ~IRQF_SHARED;
| ^~
kernel/irq/manage.c: At top level:
>> kernel/irq/manage.c:2484:5: warning: no previous prototype for 'remove_percpu_irq_target' [-Wmissing-prototypes]
2484 | int remove_percpu_irq_target(unsigned int irq)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/irq/manage.c: In function 'remove_percpu_irq_target':
kernel/irq/manage.c:2495:47: error: initialization of 'struct irq_action *' from incompatible pointer type 'struct irqaction **' [-Werror=incompatible-pointer-types]
2495 | for (struct irq_action *tmp = &desc->action; tmp; tmp = tmp->next)
| ^
>> kernel/irq/manage.c:2495:17: error: 'struct irq_action' declared in 'for' loop initial declaration
2495 | for (struct irq_action *tmp = &desc->action; tmp; tmp = tmp->next)
| ^~~
kernel/irq/manage.c:2495:76: error: invalid use of undefined type 'struct irq_action'
2495 | for (struct irq_action *tmp = &desc->action; tmp; tmp = tmp->next)
| ^~
kernel/irq/manage.c:2496:79: error: invalid use of undefined type 'struct irq_action'
2496 | if (cpumask_test_and_clear_cpu(smp_processor_id(), tmp->affinity)) {
| ^~
>> kernel/irq/manage.c:2497:52: error: 'action' undeclared (first use in this function); did you mean 'no_action'?
2497 | if (cpumask_weight(action->affinity) < nr_possible_cpus())
| ^~~~~~
| no_action
kernel/irq/manage.c:2497:52: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +2466 kernel/irq/manage.c
2452
> 2453 int add_percpu_irq_target(unsigned int irq, void __percpu *dev_id)
2454 {
2455 struct irq_desc *desc = irq_to_desc(irq);
2456
2457 if (!desc || !irq_settings_is_per_cpu_devid(desc))
2458 return -EINVAL;
2459
2460 scoped_guard(raw_spinlock_irqsave, &desc->lock) {
2461 struct irq_action *action = NULL;
2462
2463 if (cpumask_test_cpu(smp_processor_id(), desc->percpu_enabled))
2464 return -EINVAL;
2465
> 2466 for (struct irq_action *tmp = &desc->action; tmp; tmp = tmp->next) {
2467 if (cpumask_test_cpu(smp_processor_id(), tmp->affinity))
2468 return -EINVAL;
2469
2470 if (tmp->percpu_dev_id == dev_id)
2471 action = tmp;
2472 }
2473
2474 cpumask_set_cpu(smp_processor_id(), action->affinity);
2475
2476 /* If we have a full house, indicate we can't share anymore */
> 2477 if (cpumask_weight(action->affinity) == nr_possible_cpus())
2478 action->flags &= ~IRQF_SHARED;
2479 }
2480
2481 return 0;
2482 }
2483
> 2484 int remove_percpu_irq_target(unsigned int irq)
2485 {
2486 struct irq_desc *desc = irq_to_desc(irq);
2487
2488 if (!desc || !irq_settings_is_per_cpu_devid(desc))
2489 return -EINVAL;
2490
2491 scoped_guard(raw_spinlock_irqsave, &desc->lock) {
2492 if (cpumask_test_cpu(smp_processor_id(), desc->percpu_enabled))
2493 return -EINVAL;
2494
> 2495 for (struct irq_action *tmp = &desc->action; tmp; tmp = tmp->next)
2496 if (cpumask_test_and_clear_cpu(smp_processor_id(), tmp->affinity)) {
> 2497 if (cpumask_weight(action->affinity) < nr_possible_cpus())
2498 action->flags |= IRQF_SHARED;
2499
2500 return 0;
2501 }
2502 }
2503
2504 return -ENOENT;
2505 }
2506
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list