Re: [PATCH 1/2] gpiolib: Add irq_set_affinity helper for GPIO line IRQs

From: kernel test robot

Date: Fri Oct 23 2026 - 22:59:59 EST


Hi Liang,

kernel test robot noticed the following build errors:

[auto build test ERROR on brgl/gpio/for-next]
[also build test ERROR on linus/master v7.3 next-20261022]
[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/Liang-Hao/gpiolib-Add-irq_set_affinity-helper-for-GPIO-line-IRQs/20261023-231104
base: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link: https://lore.kernel.org/r/20261023151209.58772-2-haohlliang%40gmail.com
patch subject: [PATCH 1/2] gpiolib: Add irq_set_affinity helper for GPIO line IRQs
config: microblaze-defconfig (https://download.01.org/0day-ci/archive/20261024/202610241003.gRosyohv-lkp@xxxxxxxxx/config)
compiler: microblaze-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261024/202610241003.gRosyohv-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/202610241003.gRosyohv-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/gpio/gpiolib.c: In function 'gpiochip_irq_set_affinity':
>> drivers/gpio/gpiolib.c:2154:14: error: 'struct irq_data' has no member named 'parent_data'
2154 | if (d->parent_data)
| ^~
>> drivers/gpio/gpiolib.c:2155:24: error: implicit declaration of function 'irq_chip_set_affinity_parent'; did you mean 'irq_set_affinity_hint'? [-Wimplicit-function-declaration]
2155 | return irq_chip_set_affinity_parent(d, dest, force);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| irq_set_affinity_hint


vim +2154 drivers/gpio/gpiolib.c

2128
2129 /**
2130 * gpiochip_irq_set_affinity() - irq_chip set_affinity helper for GPIO lines
2131 * @d: Pointer to the GPIO line irq_data
2132 * @dest: Affinity mask to set
2133 * @force: True to enforce the mask without online CPU checks
2134 *
2135 * Hierarchical irqdomains with parent_data delegate through
2136 * irq_chip_set_affinity_parent(). GPIO irqchips that use a chained parent
2137 * handler resolve the parent virq and apply the mask through the parent
2138 * irq_chip as described in gpiochip_chained_parent_virq().
2139 *
2140 * Affinity is programmed on the parent irq, not independently per line. GPIO
2141 * lines that share one parent irq also share its affinity; updating one line
2142 * replaces the mask for all lines on that parent.
2143 *
2144 * Return: IRQ_SET_MASK_* on success, or a negative errno on error.
2145 */
2146 int gpiochip_irq_set_affinity(struct irq_data *d,
2147 const struct cpumask *dest, bool force)
2148 {
2149 struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
2150 struct irq_data *pdata;
2151 unsigned int parent;
2152 int ret;
2153
> 2154 if (d->parent_data)
> 2155 return irq_chip_set_affinity_parent(d, dest, force);
2156
2157 parent = gpiochip_chained_parent_virq(gc, d);
2158 if (!parent)
2159 return -EINVAL;
2160
2161 pdata = irq_get_irq_data(parent);
2162 if (!pdata || !pdata->chip || !pdata->chip->irq_set_affinity)
2163 return -EINVAL;
2164
2165 ret = pdata->chip->irq_set_affinity(pdata, dest, force);
2166 switch (ret) {
2167 case IRQ_SET_MASK_OK:
2168 case IRQ_SET_MASK_OK_NOCOPY:
2169 case IRQ_SET_MASK_OK_DONE:
2170 irq_data_update_effective_affinity(d,
2171 irq_data_get_effective_affinity_mask(pdata));
2172 return IRQ_SET_MASK_OK;
2173 default:
2174 return ret;
2175 }
2176 }
2177 EXPORT_SYMBOL_GPL(gpiochip_irq_set_affinity);
2178

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