* Kevin Hao <haoke...@gmail.com> wrote:

> These are used to define a static_key_{true,false} array.
> 
> Signed-off-by: Kevin Hao <haoke...@gmail.com>
> ---
>  include/linux/jump_label.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
> index 7f653e8f6690..5c1d6a49dd6b 100644
> --- a/include/linux/jump_label.h
> +++ b/include/linux/jump_label.h
> @@ -267,6 +267,12 @@ struct static_key_false {
>  #define DEFINE_STATIC_KEY_FALSE(name)        \
>       struct static_key_false name = STATIC_KEY_FALSE_INIT
>  
> +#define DEFINE_STATIC_KEY_TRUE_ARRAY(name, n)        \
> +     struct static_key_true name[n] = { [0 ... n - 1] = STATIC_KEY_TRUE_INIT 
> }
> +
> +#define DEFINE_STATIC_KEY_FALSE_ARRAY(name, n)       \
> +     struct static_key_false name[n] = { [0 ... n - 1] = 
> STATIC_KEY_FALSE_INIT }

I think the define makes the code more obfuscated and less clear, the 
open-coded 
initialization is pretty dense and easy to read to begin with.

Thanks,

        Ingo
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to