summaryrefslogtreecommitdiff
path: root/include/net/netlink.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-10-25 09:22:04 -0700
committerJakub Kicinski <kuba@kernel.org>2023-10-26 16:24:09 -0700
commitea23fbd2a8f7dadfa9cd9b9d73f3b8a69eec0671 (patch)
tree947c27968803abfa32d76edf4fda8967d77423be /include/net/netlink.h
parent5af8d8ce643478d754ef72fc239466f6ad0e2562 (diff)
netlink: make range pointers in policies const
struct nla_policy is usually constant itself, but unless we make the ranges inside constant we won't be able to make range structs const. The ranges are not modified by the core. Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: David Ahern <dsahern@kernel.org> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/20231025162204.132528-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r--include/net/netlink.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h
index aba2b162a226..83bdf787aeee 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -360,8 +360,8 @@ struct nla_policy {
const u32 mask;
const char *reject_message;
const struct nla_policy *nested_policy;
- struct netlink_range_validation *range;
- struct netlink_range_validation_signed *range_signed;
+ const struct netlink_range_validation *range;
+ const struct netlink_range_validation_signed *range_signed;
struct {
s16 min, max;
};