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

Christophe JAILLET <[email protected]>
Newsgroups org.kernel.vger.kernel-janitors,org.kernel.vger.linux-kernel
Message-ID <4bff474cf71dc5f5e2fa4334eef4d501e8a67bf6.1780343698.git.christophe.jaillet@wanadoo.fr>
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 <[email protected]>
---
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@wanadoo.fr/
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.