Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88829559 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman
Browse files

staging: mt7621-gpio: avoid one level indentation in interrupt handler



There is no need to check for 'pending' before loop over the
interrupts using 'for_each_set_bit' if nothing is set the
return values will be the same so just avoid this check avoiding
also one level intentation and improving readability.

Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e4550f6e
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ mediatek_gpio_irq_handler(int irq, void *data)

	pending = mtk_gpio_r32(rg, GPIO_REG_STAT);

	if (pending) {
	for_each_set_bit(bit, &pending, MTK_BANK_WIDTH) {
		u32 map = irq_find_mapping(gc->irq.domain, bit);

@@ -101,7 +100,6 @@ mediatek_gpio_irq_handler(int irq, void *data)
		mtk_gpio_w32(rg, GPIO_REG_STAT, BIT(bit));
		ret |= IRQ_HANDLED;
	}
	}

	return ret;
}