[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFzqF0C1eiidR=ycJ0DhV3MiWJRkOmi-GEcgT7J6Dm+a5g@mail.gmail.com>
Date: Tue, 6 Mar 2012 13:47:09 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Sven Joachim <svenjoac@....de>,
Stefan Lippers-Hollmann <s.L-H@....de>,
Greg KH <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>, stable@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Jonathan Nieder <jrnieder@...il.com>,
linux-wireless@...r.kernel.org,
Stefano Brivio <stefano.brivio@...imi.it>
Subject: Re: [ 57/72] genirq: Unmask oneshot irqs when thread was not woken
On Tue, Mar 6, 2012 at 1:40 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> (*) "1 << ffz(a)" can be written as
>
> a = ~a; /* Turn the zero bits into 1 bits */
> a &= -a; /* .. and find the first one. */
>
> without ever doing any insane bit scanning.
Alternatively, wite it directly as "(a+1) &~a", which is the same
expression just written differently (due to "-a == ~a+1")
Yeah, I've been playing too much with the bitwise optimizations of the
dentry cache name comparisons lately.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists