[PATCH 66/74] backports: add split_ops to nl80211
Johannes Berg <[email protected]> Fri, 24 May 2024 19:08:18 +0200
| Newsgroups | org.kernel.vger.backports |
|---|---|
| Message-ID | <20240524190907.dad1104c296d.I98da0a61961b922d5bd507d894c5cd9b3086df66@changeid> |
From: Gregory Greenman <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Signed-off-by: Johannes Berg <[email protected]> --- patches/0109-add-genl_split_ops.cocci | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 patches/0109-add-genl_split_ops.cocci 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) + { ... } -- 2.45.1