Re: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups+ docs

From: H. Peter Anvin
Date: Thu Feb 23 2012 - 12:11:06 EST


On 02/23/2012 08:21 AM, 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.
>

The normal way to do this is to make the type an array of size 1.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/