Re: [PATCH] genirq: Keep affinity_hint unchanged if it has a value

From: kernel test robot
Date: Tue Mar 11 2025 - 14:51:58 EST


Hi Yajun,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/irq/core]
[also build test ERROR on linus/master v6.14-rc6 next-20250311]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Yajun-Deng/genirq-Keep-affinity_hint-unchanged-if-it-has-a-value/20250311-093633
base: tip/irq/core
patch link: https://lore.kernel.org/r/20250311013352.2727490-1-yajun.deng%40linux.dev
patch subject: [PATCH] genirq: Keep affinity_hint unchanged if it has a value
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20250312/202503120232.2RVdFOyX-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250312/202503120232.2RVdFOyX-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/202503120232.2RVdFOyX-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

kernel/irq/irqdesc.c: In function 'alloc_masks':
>> kernel/irq/irqdesc.c:61:38: error: passing argument 1 of 'zalloc_cpumask_var_node' from incompatible pointer type [-Werror=incompatible-pointer-types]
61 | if (!zalloc_cpumask_var_node(&desc->affinity_hint,
| ^~~~~~~~~~~~~~~~~~~~
| |
| struct cpumask **
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/spinlock.h:63,
from include/linux/irq.h:14,
from kernel/irq/irqdesc.c:10:
include/linux/cpumask.h:996:68: note: expected 'struct cpumask (*)[1]' but argument is of type 'struct cpumask **'
996 | static __always_inline bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
| ~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors


vim +/zalloc_cpumask_var_node +61 kernel/irq/irqdesc.c

53
54 #ifdef CONFIG_SMP
55 static int alloc_masks(struct irq_desc *desc, int node)
56 {
57 if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity,
58 GFP_KERNEL, node))
59 return -ENOMEM;
60
> 61 if (!zalloc_cpumask_var_node(&desc->affinity_hint,
62 GFP_KERNEL, node)) {
63 free_cpumask_var(desc->irq_common_data.affinity);
64 return -ENOMEM;
65 }
66

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