summaryrefslogtreecommitdiffstats
path: root/include/net/netlink.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-09-26 11:15:31 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-28 10:24:39 -0700
commit48fde90a78f8c67e2bec5061f9725fe363519feb (patch)
tree9a1c59ea9061b11a42fc02b9b8749404431e757b /include/net/netlink.h
parentfe3b30ddb90face841b2ede3b73ed2e9cfece6ba (diff)
downloadlinux-48fde90a78f8c67e2bec5061f9725fe363519feb.tar.gz
linux-48fde90a78f8c67e2bec5061f9725fe363519feb.tar.bz2
linux-48fde90a78f8c67e2bec5061f9725fe363519feb.zip
netlink: make validation_data const
The validation data is only used within the policy that should usually already be const, and isn't changed in any code that uses it. Therefore, make the validation_data pointer const. While at it, remove the duplicate variable in the bitfield validation that I'd otherwise have to change to const. Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r--include/net/netlink.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h
index b680fe365e91..0d698215d4d9 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -237,7 +237,7 @@ enum {
struct nla_policy {
u16 type;
u16 len;
- void *validation_data;
+ const void *validation_data;
};
#define NLA_POLICY_EXACT_LEN(_len) { .type = NLA_EXACT_LEN, .len = _len }