[PATCH 1/5] irqchip/irq-pic32-evic: address warning related to wrong printf() formatter

From: Brian Masney

Date: Sun Feb 22 2026 - 18:46:14 EST


This driver is currently only build on 32 bit MIPS systems. When
building it on x86_64, the following warning occurs:

drivers/irqchip/irq-pic32-evic.c: In function ‘pic32_ext_irq_of_init’:
./include/linux/kern_levels.h:5:25: error: format ‘%d’ expects argument of type
‘int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
./include/linux/printk.h:483:25: note: in definition of macro ‘printk_index_wrap’
483 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
./include/linux/printk.h:564:9: note: in expansion of macro ‘printk’
564 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
./include/linux/kern_levels.h:12:25: note: in expansion of macro ‘KERN_SOH’
12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */
| ^~~~~~~~
./include/linux/printk.h:564:16: note: in expansion of macro ‘KERN_WARNING’
564 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~
drivers/irqchip/irq-pic32-evic.c:203:25: note: in expansion of macro ‘pr_warn’
203 | pr_warn("More than %d external irq, skip rest\n",
| ^~~~~~~

Update the printf() formatter in preparation for allowing this driver to
be compiled on all architectures.

Fixes: aaa8666ada780 ("IRQCHIP: irq-pic32-evic: Add support for PIC32 interrupt controller")
Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
---
drivers/irqchip/irq-pic32-evic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-pic32-evic.c b/drivers/irqchip/irq-pic32-evic.c
index e85c3e3007018ffc293876523b535b0b7dab06de..325b97a0287f632177d85d5bfec6f1ab54418ad9 100644
--- a/drivers/irqchip/irq-pic32-evic.c
+++ b/drivers/irqchip/irq-pic32-evic.c
@@ -196,7 +196,7 @@ static void __init pic32_ext_irq_of_init(struct irq_domain *domain)

of_property_for_each_u32(node, pname, hwirq) {
if (i >= ARRAY_SIZE(priv->ext_irqs)) {
- pr_warn("More than %d external irq, skip rest\n",
+ pr_warn("More than %zu external irq, skip rest\n",
ARRAY_SIZE(priv->ext_irqs));
break;
}

--
2.53.0