Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752657AbbHTMPH (ORCPT ); Thu, 20 Aug 2015 08:15:07 -0400 Received: from mail-yk0-f175.google.com ([209.85.160.175]:35851 "EHLO mail-yk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751511AbbHTMPD (ORCPT ); Thu, 20 Aug 2015 08:15:03 -0400 From: Kevin Hao To: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Benjamin Herrenschmidt Subject: [PATCH 3/8] jump_label: introduce DEFINE_STATIC_KEY_{TRUE,FALSE}_ARRAY macros Date: Thu, 20 Aug 2015 20:14:31 +0800 Message-Id: <1440072876-8321-4-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1440072876-8321-1-git-send-email-haokexin@gmail.com> References: <1440072876-8321-1-git-send-email-haokexin@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 32 These are used to define a static_key_{true,false} array. Signed-off-by: Kevin Hao --- 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 } + #ifdef HAVE_JUMP_LABEL /* -- 2.1.0 -- 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/