From: Gregory Greenman <gregory.greenman@xxxxxxxxx> Signed-off-by: Gregory Greenman <gregory.greenman@xxxxxxxxx> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- 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