Messages in this thread | | | Date | Fri, 24 Feb 2012 10:11:03 +0100 | From | Ingo Molnar <> | Subject | Re: [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
| |