[Drbd-dev] [Patch v1 6/8] Statically initialize families

Nick Wang nwang at suse.com
Mon Mar 13 08:23:29 CET 2017


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 <nwang at suse.com>
CC: Lars Ellenberg <lars.ellenberg at linbit.com>
CC: Roland Kammerer <roland.kammerer at linbit.com>
CC: drbd-dev at lists.linbit.com 
---
 tests/have_genl_family_in_genlmsg_multicast.c | 9 +++++++++
 tests/have_genl_id_generate.c                 | 6 ++++++
 2 files changed, 15 insertions(+)
 create mode 100644 tests/have_genl_family_in_genlmsg_multicast.c
 create mode 100644 tests/have_genl_id_generate.c

diff --git a/tests/have_genl_family_in_genlmsg_multicast.c b/tests/have_genl_family_in_genlmsg_multicast.c
new file mode 100644
index 0000000..6d44faa
--- /dev/null
+++ b/tests/have_genl_family_in_genlmsg_multicast.c
@@ -0,0 +1,9 @@
+#include <net/genetlink.h>
+
+void test(void)
+{
+	struct genl_family family = { };
+	struct sk_buff *skb = NULL;
+
+	genlmsg_multicast(&family, skb, 0, 0, GFP_KERNEL);
+}
diff --git a/tests/have_genl_id_generate.c b/tests/have_genl_id_generate.c
new file mode 100644
index 0000000..4ef0e8e
--- /dev/null
+++ b/tests/have_genl_id_generate.c
@@ -0,0 +1,6 @@
+#include <linux/genetlink.h>
+
+void test(void)
+{
+	int i = GENL_ID_GENERATE;
+}
-- 
1.8.5.6



More information about the drbd-dev mailing list