Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754663Ab2FNH7W (ORCPT ); Thu, 14 Jun 2012 03:59:22 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:38416 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752305Ab2FNH7U (ORCPT ); Thu, 14 Jun 2012 03:59:20 -0400 Date: Thu, 14 Jun 2012 00:59:19 -0700 (PDT) Message-ID: <874nqeqq7g.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Paul Mundt Cc: Linus Walleij , Grant Likely , Kuninori Morimoto , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2 v2][resend] gpio: pcf857x: enable gpio_to_irq() support In-Reply-To: <20120614072322.GC22007@linux-sh.org> References: <877gw2uis5.wl%kuninori.morimoto.gx@renesas.com> <87d352qymy.wl%kuninori.morimoto.gx@renesas.com> <87aa06qykw.wl%kuninori.morimoto.gx@renesas.com> <20120614061519.GB22007@linux-sh.org> <878vfqqsnw.wl%kuninori.morimoto.gx@renesas.com> <877gvaqsfz.wl%kuninori.morimoto.gx@renesas.com> <20120614072322.GC22007@linux-sh.org> User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 27 Hi Paul > On Thu, Jun 14, 2012 at 12:10:59AM -0700, Kuninori Morimoto wrote: > > + for (i = 0; i < gpio->chip.ngpio; i++) > > + if (change & BIT(i)) > > + generic_handle_irq(irq_find_mapping(gpio->irq_domain, i)); > > + > You can probably get away with using for_each_set_bit() as well, which > would simplify this a bit. > > Also, do you not have to worry about masking the parent IRQ while > iterating through the dispatch loop? This device automatically stops its IRQ until data was read. And it is using spin_lock_irqsave(), and it needs to save prev status. So, I guess masking parent IRQ is not needed. But not enough/good ? Best regards --- Kuninori Morimoto -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/