Return-Path: Received: from prv3-mh.provo.novell.com (prv3-mh.provo.novell.com [137.65.250.26]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTPS id 0567F1056494 for ; Mon, 13 Mar 2017 08:24:16 +0100 (CET) From: Nick Wang To: drbd-dev@lists.linbit.com Date: Mon, 13 Mar 2017 15:23:31 +0800 Message-Id: <1489389811-31234-9-git-send-email-nwang@suse.com> In-Reply-To: <1489389811-31234-1-git-send-email-nwang@suse.com> References: <1489389811-31234-1-git-send-email-nwang@suse.com> Cc: Lars Ellenberg , Roland Kammerer Subject: [Drbd-dev] [Patch v1 8/8] Statically initialize families List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , In a07ea4d9, genetlink no longer use static family id. GENL_ID_GENERATE is removed. In 489111e5, statically initialize the families and remove the inline functions. Signed-off-by: Nick Wang CC: Lars Ellenberg CC: Roland Kammerer CC: drbd-dev@lists.linbit.com --- linux/genl_magic_func.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux/genl_magic_func.h b/linux/genl_magic_func.h index d14a557..ae9b9de 100644 --- a/linux/genl_magic_func.h +++ b/linux/genl_magic_func.h @@ -251,7 +251,9 @@ static struct genl_ops ZZZ_genl_ops[] __read_mostly = { */ #define ZZZ_genl_family CONCAT_(GENL_MAGIC_FAMILY, _genl_family) static struct genl_family ZZZ_genl_family __read_mostly = { +#ifdef HAVE_GENL_ID_GENERATE .id = GENL_ID_GENERATE, +#endif .name = __stringify(GENL_MAGIC_FAMILY), .version = GENL_MAGIC_VERSION, #ifdef GENL_MAGIC_FAMILY_HDRSZ @@ -275,7 +277,8 @@ static struct genl_family ZZZ_genl_family __read_mostly = { * genetlink: only pass array to genl_register_family_with_ops() * which are commits c53ed742..2a94fe48 */ -#ifdef genl_register_family_with_ops_groups +#if defined(genl_register_family_with_ops_groups) || \ + defined(COMPAT_HAVE_GENL_FAMILY_IN_GENLMSG_MULTICAST) #include #else #include -- 1.8.5.6