[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150821063458.GC12451@pek-khao-d1.corp.ad.wrs.com>
Date: Fri, 21 Aug 2015 14:34:58 +0800
From: Kevin Hao <haokexin@...il.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: Michael Ellerman <mpe@...erman.id.au>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 3/8] jump_label: introduce
DEFINE_STATIC_KEY_{TRUE,FALSE}_ARRAY macros
On Fri, Aug 21, 2015 at 08:28:26AM +0200, Ingo Molnar wrote:
>
> * Kevin Hao <haokexin@...il.com> wrote:
>
> > These are used to define a static_key_{true,false} array.
> >
> > Signed-off-by: Kevin Hao <haokexin@...il.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.
OK, I will drop this patch and move the initialization of the array to the
corresponding patch.
Thanks,
Kevin
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists