Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753766AbbHUGfO (ORCPT ); Fri, 21 Aug 2015 02:35:14 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:35212 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751737AbbHUGfL (ORCPT ); Fri, 21 Aug 2015 02:35:11 -0400 Date: Fri, 21 Aug 2015 14:34:58 +0800 From: Kevin Hao To: Ingo Molnar Cc: Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Peter Zijlstra Subject: Re: [PATCH 3/8] jump_label: introduce DEFINE_STATIC_KEY_{TRUE,FALSE}_ARRAY macros Message-ID: <20150821063458.GC12451@pek-khao-d1.corp.ad.wrs.com> References: <1440072876-8321-1-git-send-email-haokexin@gmail.com> <1440072876-8321-4-git-send-email-haokexin@gmail.com> <20150821062826.GA566@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZmUaFz6apKcXQszQ" Content-Disposition: inline In-Reply-To: <20150821062826.GA566@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2177 Lines: 64 --ZmUaFz6apKcXQszQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 21, 2015 at 08:28:26AM +0200, Ingo Molnar wrote: >=20 > * Kevin Hao wrote: >=20 > > These are used to define a static_key_{true,false} array. > >=20 > > Signed-off-by: Kevin Hao > > --- > > include/linux/jump_label.h | 6 ++++++ > > 1 file changed, 6 insertions(+) > >=20 > > 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 =3D STATIC_KEY_FALSE_INIT > > =20 > > +#define DEFINE_STATIC_KEY_TRUE_ARRAY(name, n) \ > > + struct static_key_true name[n] =3D { [0 ... n - 1] =3D STATIC_KEY_TRU= E_INIT } > > + > > +#define DEFINE_STATIC_KEY_FALSE_ARRAY(name, n) \ > > + struct static_key_false name[n] =3D { [0 ... n - 1] =3D STATIC_KEY_FA= LSE_INIT } >=20 > I think the define makes the code more obfuscated and less clear, the ope= n-coded=20 > 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 --ZmUaFz6apKcXQszQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJV1saSAAoJEJNY7TDerrFxWMAIAMl2ek57AbbSaUciuND2R8zY Lcfmws7UgcAIoSTGPe3NuyOASAIon26FYe9H6CA+kaL9tIxmUtuE5Ewe39ZPZU2C nJWdR+kLd2sTXZSTljFtrn0I0FiTTd0CitHC4+YztNcDfr6L77mTQntS6x+J1CB3 RYb4PjYX/u0H6CcvHczirvasWRU8sq8NJikyYsTois7UwKtsb4jFGKHAySi9y7FU hUMINbTEi9pnRaGL0tz0vidYNxgMMqodwhrZyH8fgHVZHPlUfizMMecpXAVRLYK9 uJNbAgOB45DF+o2oYLDHATayrc7vWyHM3sPIjzWh+iTNa+G73oBLIfn16CkNQ1s= =571b -----END PGP SIGNATURE----- --ZmUaFz6apKcXQszQ-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/