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

From: Ingo Molnar
Date: Fri Feb 24 2012 - 04:11:43 EST



* Jason Baron <jbaron@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/