Skip to content

Commit 7f45fe2

Browse files
jimliu3Bartosz Golaszewski
authored andcommitted
gpio: nuvoton: Fix sgpio irq handle error
The generic_handle_domain_irq() function calls irq_resolve_mapping(). Thus delete a duplicative irq_find_mapping() call so that a stack trace and an RCU stall will be avoided. Fixes: c4f8457 ("gpio: nuvoton: Add Nuvoton NPCM sgpio driver") Signed-off-by: Jim Liu <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 2b5ae9c commit 7f45fe2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/gpio/gpio-npcm-sgpio.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ static void npcm_sgpio_irq_handler(struct irq_desc *desc)
434434
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
435435
struct irq_chip *ic = irq_desc_get_chip(desc);
436436
struct npcm_sgpio *gpio = gpiochip_get_data(gc);
437-
unsigned int i, j, girq;
437+
unsigned int i, j;
438438
unsigned long reg;
439439

440440
chained_irq_enter(ic, desc);
@@ -443,11 +443,9 @@ static void npcm_sgpio_irq_handler(struct irq_desc *desc)
443443
const struct npcm_sgpio_bank *bank = &npcm_sgpio_banks[i];
444444

445445
reg = ioread8(bank_reg(gpio, bank, EVENT_STS));
446-
for_each_set_bit(j, &reg, 8) {
447-
girq = irq_find_mapping(gc->irq.domain,
448-
i * 8 + gpio->nout_sgpio + j);
449-
generic_handle_domain_irq(gc->irq.domain, girq);
450-
}
446+
for_each_set_bit(j, &reg, 8)
447+
generic_handle_domain_irq(gc->irq.domain,
448+
i * 8 + gpio->nout_sgpio + j);
451449
}
452450

453451
chained_irq_exit(ic, desc);

0 commit comments

Comments
 (0)