On Fri, Aug 23, 2013 at 9:30 PM, Markus Mayer <markus.mayer@xxxxxxxxxx> wrote: > I have a follow-up question regarding status reads for each iteration. > Is this what you are looking for? > > for (;;) { > sta = readl(reg_base + GPIO_INT_STATUS(bank_id)) & > (~(readl(reg_base + GPIO_INT_MASK(bank_id)))); > if (sta == 0) > break; Yes, but follow the design pattern of other drivers such as the drivers/irqchip/irq-vic.c: static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs) { u32 stat, irq; int handled = 0; while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) { irq = ffs(stat) - 1; handle_IRQ(irq_find_mapping(vic->domain, irq), regs); handled = 1; } } I.e use that nice while-construction. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html