Return-path: Received: from mail-wi0-f174.google.com ([209.85.212.174]:48489 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757538Ab2CFVra convert rfc822-to-8bit (ORCPT ); Tue, 6 Mar 2012 16:47:30 -0500 MIME-Version: 1.0 In-Reply-To: References: <20120228010511.GA8453@kroah.com> <20120228010434.412979550@linuxfoundation.org> <87hay4dqjr.fsf@turtle.gmx.de> <201203050143.24541.s.L-H@gmx.de> <8762eh1p7d.fsf@turtle.gmx.de> From: Linus Torvalds Date: Tue, 6 Mar 2012 13:47:09 -0800 Message-ID: (sfid-20120306_224736_753588_F68D31FE) Subject: Re: [ 57/72] genirq: Unmask oneshot irqs when thread was not woken To: Thomas Gleixner Cc: Sven Joachim , Stefan Lippers-Hollmann , Greg KH , LKML , stable@vger.kernel.org, Andrew Morton , Alan Cox , Jonathan Nieder , linux-wireless@vger.kernel.org, Stefano Brivio Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Tue, Mar 6, 2012 at 1:40 PM, Linus Torvalds 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