Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754174Ab0LOVkd (ORCPT ); Wed, 15 Dec 2010 16:40:33 -0500 Received: from terminus.zytor.com ([198.137.202.10]:45059 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752948Ab0LOVkc (ORCPT ); Wed, 15 Dec 2010 16:40:32 -0500 Message-ID: <4D093580.9000303@zytor.com> Date: Wed, 15 Dec 2010 13:39:12 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Thunderbird/3.1.7 MIME-Version: 1.0 To: Miguel Ojeda CC: Andrew Morton , Christoph Lameter , Tejun Heo , Pekka Enbeerg , linux-kernel@vger.kernel.org, Eric Dumazet , Mathieu Desnoyers Subject: Re: x86: A fast way to check capabilities of the current cpu References: <20101215125626.25f7d648.akpm@linux-foundation.org> <4D092D15.7030700@zytor.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 591 Lines: 16 On 12/15/2010 01:30 PM, Miguel Ojeda wrote: > > In this case it this_cpu_*_test_bit() return an int, but they act as a > bool and are used in if()s; where is the catch? > If they aren't, and are stored in a variable for whatever reason, then the || form will generate additional instructions to booleanize the value for no good reason. -hpa -- 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/