genetlink: constify genl_err_attr() argument
authorMichal Kubecek <mkubecek@suse.cz>
Tue, 28 Aug 2018 16:51:58 +0000 (18:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Aug 2018 02:42:52 +0000 (19:42 -0700)
genl_err_attr() sets netlink_ext_ack::bad_attr which is a pointer to const
struct nlattr so make the attr argument also const.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/genetlink.h

index decf6012a40163c564900c3c39e50d2bf48aa64f..aa2e5888f18d60e6b56c8ad4eea2dee1fe770c9b 100644 (file)
@@ -112,7 +112,7 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net)
 #define GENL_SET_ERR_MSG(info, msg) NL_SET_ERR_MSG((info)->extack, msg)
 
 static inline int genl_err_attr(struct genl_info *info, int err,
-                               struct nlattr *attr)
+                               const struct nlattr *attr)
 {
        info->extack->bad_attr = attr;