lkml.org 
[lkml]   [2012]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups + docs

* Jason Baron <jbaron@redhat.com> 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


\
 
 \ /
  Last update: 2012-02-24 10:13    [W:0.259 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site