lkml.org 
[lkml]   [2016]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] irqchip: mips-gic: Use for_each_set_bit to iterate over IRQs
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 <paul.burton@imgtec.com>
> ---
> drivers/irqchip/irq-mips-gic.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)

Applied to irqchip/core.

thx,

Jason.

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.040 / U:1.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site