summaryrefslogtreecommitdiff
path: root/patches/0078-genl-extack.cocci
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-08-02 21:42:36 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2019-08-14 20:15:48 +0200
commit28cbfac2b71b68adc1b0e8af290eac7d3ff9a130 (patch)
treec8e01c0740c1ea542ee4ae777540e7cd994cc29e /patches/0078-genl-extack.cocci
parent4c1701f7f734d2629a521dea888750015cd38c13 (diff)
backport: Add genl_callback_extack() function
The struct netlink_callback got a new extack attribute in commit 4a19edb60d02 ("netlink: Pass extack to dump handlers") in kernel 4.20. Use a function instead of directly accessing it to return NULL on older kernel versions, the code should handle NULL. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches/0078-genl-extack.cocci')
-rw-r--r--patches/0078-genl-extack.cocci6
1 files changed, 6 insertions, 0 deletions
diff --git a/patches/0078-genl-extack.cocci b/patches/0078-genl-extack.cocci
index 5560e09d..860d68b4 100644
--- a/patches/0078-genl-extack.cocci
+++ b/patches/0078-genl-extack.cocci
@@ -9,3 +9,9 @@ struct genl_info *info;
@@
-info->userhdr
+genl_info_userhdr(info)
+
+@@
+struct netlink_callback *cb;
+@@
+-cb->extack
++genl_callback_extack(cb)