From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757041AbcHWBOf (ORCPT ); Mon, 22 Aug 2016 21:14:35 -0400 Received: from outbound1a.ore.mailhop.org ([54.213.22.21]:49142 "EHLO outbound1a.ore.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756805AbcHWBOe (ORCPT ); Mon, 22 Aug 2016 21:14:34 -0400 X-MHO-User: cd7ff8ea-68ce-11e6-b68f-d7e0fd28072a X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 74.99.77.15 X-Mail-Handler: DuoCircle Outbound SMTP X-DKIM: OpenDKIM Filter v2.6.8 io 86D5680336 Date: Tue, 23 Aug 2016 01:13:17 +0000 From: Jason Cooper To: Paul Burton Cc: Thomas Gleixner , Marc Zyngier , linux-kernel@vger.kernel.org, linux-mips@linux-mips.org Subject: Re: [PATCH] irqchip: mips-gic: Use for_each_set_bit to iterate over IRQs Message-ID: <20160823011317.GV3353@io.lakedaemon.net> References: <20160819171119.28121-1-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160819171119.28121-1-paul.burton@imgtec.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, On Fri, Aug 19, 2016 at 06:11:19PM +0100, Paul Burton wrote: > The MIPS GIC driver has previously iterated over bits set in a bitmap > representing pending IRQs by calling find_first_bit, clearing that bit > then calling find_first_bit again until all bits are clear. If multiple > interrupts are pending then this is wasteful, as find_first_bit will > have to loop over the whole bitmap from the start. Use the > for_each_set_bit macro which performs exactly what we need here instead. > It will use find_next_bit and thus only scan over the relevant part of > the bitmap, and it makes the intent of the code clearer. > > Signed-off-by: Paul Burton > --- > drivers/irqchip/irq-mips-gic.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) Applied to irqchip/core. thx, Jason.