[PATCH v2 2/7] irqchip: Constify "struct irq_chip *" parameter in cond_xxx_eoi_irq()

From: Christophe JAILLET

Date: Mon Jun 01 2026 - 16:28:47 EST


cond_unmask_eoi_irq() and cond_eoi_irq() don't modify their 'chip'
parameter.

So change the prototype of this function to accept const struct irq_chip
pointer.

Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
Compile tested only

Changes in v2:
- Update cond_eoi_irq() which is new since v1

v1: https://lore.kernel.org/all/db3ec8b3425552b3921281e88fe6a0b1cd55e20f.1731835733.git.christophe.jaillet@xxxxxxxxxx/
---
kernel/irq/chip.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index b635e3c5d5b6..04e478a2adaa 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -699,7 +699,8 @@ void handle_level_irq(struct irq_desc *desc)
}
EXPORT_SYMBOL_GPL(handle_level_irq);

-static void cond_unmask_eoi_irq(struct irq_desc *desc, struct irq_chip *chip)
+static void cond_unmask_eoi_irq(struct irq_desc *desc,
+ const struct irq_chip *chip)
{
if (!(desc->istate & IRQS_ONESHOT)) {
chip->irq_eoi(&desc->irq_data);
@@ -720,7 +721,7 @@ static void cond_unmask_eoi_irq(struct irq_desc *desc, struct irq_chip *chip)
}
}

-static inline void cond_eoi_irq(struct irq_chip *chip, struct irq_data *data)
+static inline void cond_eoi_irq(const struct irq_chip *chip, struct irq_data *data)
{
if (!(chip->flags & IRQCHIP_EOI_IF_HANDLED))
chip->irq_eoi(data);
--
2.54.0