Re: [PATCH v10 4/4] irqchip/irq-loongarch-ir:Add Redirect irqchip support

From: kernel test robot

Date: Tue Feb 03 2026 - 04:19:32 EST


Hi Tianyang,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/irq/core]
[also build test WARNING on linus/master v6.19-rc8 next-20260202]
[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/Tianyang-Zhang/Docs-LoongArch-Add-Advanced-Extended-Redirect-IRQ-model-description/20260202-171607
base: tip/irq/core
patch link: https://lore.kernel.org/r/20260202091041.2278271-5-zhangtianyang%40loongson.cn
patch subject: [PATCH v10 4/4] irqchip/irq-loongarch-ir:Add Redirect irqchip support
config: loongarch-randconfig-r072-20260203 (https://download.01.org/0day-ci/archive/20260203/202602031759.6a4E6Hm4-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 15.2.0
smatch version: v0.5.0-8994-gd50c5a4c

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/202602031759.6a4E6Hm4-lkp@xxxxxxxxx/

smatch warnings:
drivers/irqchip/irq-loongarch-ir.c:206 redirect_table_alloc() warn: unsigned 'index' is never less than zero.
drivers/irqchip/irq-loongarch-ir.c:206 redirect_table_alloc() warn: error code type promoted to positive: 'index'

vim +/index +206 drivers/irqchip/irq-loongarch-ir.c

192
193 static int redirect_table_alloc(int node, u32 nr_irqs)
194 {
195 struct redirect_table *ird_table = &irde_descs[node].ird_table;
196 unsigned int index, order = 0;
197
198 if (nr_irqs > 1) {
199 nr_irqs = __roundup_pow_of_two(nr_irqs);
200 order = ilog2(nr_irqs);
201 }
202
203 guard(raw_spinlock_irqsave)(&ird_table->lock);
204
205 index = bitmap_find_free_region(ird_table->bitmap, IRD_ENTRIES, order);
> 206 if (index < 0) {
207 pr_err("No redirect entry to use\n");
208 return -EINVAL;
209 }
210
211 return index;
212 }
213

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