Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756405Ab2BXJLo (ORCPT ); Fri, 24 Feb 2012 04:11:44 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:42283 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754939Ab2BXJLm (ORCPT ); Fri, 24 Feb 2012 04:11:42 -0500 Date: Fri, 24 Feb 2012 10:11:03 +0100 From: Ingo Molnar To: Jason Baron Cc: Paul Mackerras , "H. Peter Anvin" , Steven Rostedt , a.p.zijlstra@chello.nl, mathieu.desnoyers@efficios.com, davem@davemloft.net, ddaney.cavm@gmail.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups + docs Message-ID: <20120224091103.GC814@elte.hu> References: <4F43F9F0.4000605@zytor.com> <20120221202019.GB2381@redhat.com> <1329856745.25686.72.camel@gandalf.stny.rr.com> <20120222073251.GB17291@elte.hu> <20120222075334.GA25053@elte.hu> <7479958c-1932-4ced-a7a4-53ac6ea3a38e@email.android.com> <20120222081855.GB25318@elte.hu> <20120222213343.GA19758@bloggs.ozlabs.ibm.com> <20120223100205.GD24310@elte.hu> <20120223162158.GA2401@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120223162158.GA2401@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=AWL,BAYES_00 autolearn=no SpamAssassin version=3.3.1 -2.0 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 AWL AWL: From: address is in the auto white-list Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1165 Lines: 33 * Jason Baron wrote: > So, we could get rid of the '&' with something as simple as: > > #define very_unlikely(key) __very_unlikely(&key) > > However, it does seem potentially more error prone, b/c if > 'key' is passed to a function, and they we do the > very_unlikely() we end up with the address parameter (due to > pass by value). That said, it doesn't look like anybody is > using very_unlikely() in that manner in the tree, and we could > document the usage. > > In any case, I did the conversion, to see what it would look > like, if anybody is interested: I agree that it's still error-prone - it also departs from how we typically use C APIs in the kernel. With the static_key_*() naming there's no desire to make it work like unlikely() anymore and there's no need to pass in the object by value - passing by reference is fine. So I don't think we need this. Thanks, Ingo -- 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/