]> Git Repo - linux.git/commitdiff
gpio: nuvoton: Fix sgpio irq handle error
authorJim Liu <[email protected]>
Mon, 6 May 2024 06:42:44 +0000 (14:42 +0800)
committerBartosz Golaszewski <[email protected]>
Tue, 7 May 2024 07:44:33 +0000 (09:44 +0200)
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: c4f8457d17ce ("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]>
drivers/gpio/gpio-npcm-sgpio.c

index d31788b43abcc7826ee653a90e5cff15e44479d2..26057061454348d383129267e8bb0b8c506ea5c1 100644 (file)
@@ -434,7 +434,7 @@ static void npcm_sgpio_irq_handler(struct irq_desc *desc)
        struct gpio_chip *gc = irq_desc_get_handler_data(desc);
        struct irq_chip *ic = irq_desc_get_chip(desc);
        struct npcm_sgpio *gpio = gpiochip_get_data(gc);
-       unsigned int i, j, girq;
+       unsigned int i, j;
        unsigned long reg;
 
        chained_irq_enter(ic, desc);
@@ -443,11 +443,9 @@ static void npcm_sgpio_irq_handler(struct irq_desc *desc)
                const struct npcm_sgpio_bank *bank = &npcm_sgpio_banks[i];
 
                reg = ioread8(bank_reg(gpio, bank, EVENT_STS));
-               for_each_set_bit(j, &reg, 8) {
-                       girq = irq_find_mapping(gc->irq.domain,
-                                               i * 8 + gpio->nout_sgpio + j);
-                       generic_handle_domain_irq(gc->irq.domain, girq);
-               }
+               for_each_set_bit(j, &reg, 8)
+                       generic_handle_domain_irq(gc->irq.domain,
+                                                 i * 8 + gpio->nout_sgpio + j);
        }
 
        chained_irq_exit(ic, desc);
This page took 0.061275 seconds and 4 git commands to generate.