diff mbox series

[66/74] backports: add split_ops to nl80211

Message ID 20240524190907.dad1104c296d.I98da0a61961b922d5bd507d894c5cd9b3086df66@changeid (mailing list archive)
State New, archived
Headers show
Series backport updates from Intel | expand

Commit Message

Johannes Berg May 24, 2024, 5:08 p.m. UTC
From: Gregory Greenman <gregory.greenman@intel.com>

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 patches/0109-add-genl_split_ops.cocci | 43 +++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 patches/0109-add-genl_split_ops.cocci
diff mbox series

Patch

diff --git a/patches/0109-add-genl_split_ops.cocci b/patches/0109-add-genl_split_ops.cocci
new file mode 100644
index 000000000000..02b8809a0003
--- /dev/null
+++ b/patches/0109-add-genl_split_ops.cocci
@@ -0,0 +1,43 @@ 
+@pre@
+identifier fam, f;
+@@
+struct genl_family fam = {
+        .pre_doit = f,
+...
+};
+
+@@
+identifier ops, skb, info;
+identifier pre.f;
+@@
+int f(
++#if LINUX_VERSION_IS_GEQ(6,2,0)
+ const struct genl_split_ops *ops,
++#else
++const struct genl_ops *ops,
++#endif
+        struct sk_buff *skb,
+        struct genl_info *info)
+ { ... }
+
+@post@
+identifier fam, f;
+@@
+struct genl_family fam = {
+        .post_doit = f,
+...
+};
+
+@@
+identifier ops, skb, info;
+identifier post.f;
+@@
+void f(
++#if LINUX_VERSION_IS_GEQ(6,2,0)
+ const struct genl_split_ops *ops,
++#else
++const struct genl_ops *ops,
++#endif
+        struct sk_buff *skb,
+        struct genl_info *info)
+ { ... }