summaryrefslogtreecommitdiffstats
path: root/net/smc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-05-25 17:31:58 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-27 05:19:13 +0200
commit09d0310f07672b7e3e60cf719b96c803f4830e5c (patch)
treeee274113eb7349a0d34b81a0e782396a0f326aaf /net/smc
parentMerge tag 'mac80211-next-for-net-next-2020-04-25' of git://git.kernel.org/pub... (diff)
downloadlinux-09d0310f07672b7e3e60cf719b96c803f4830e5c.tar.xz
linux-09d0310f07672b7e3e60cf719b96c803f4830e5c.zip
net/smc: mark smc_pnet_policy as const
Netlink policies are generally declared as const. This is safer and prevents potential bugs. Signed-off-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc')
-rw-r--r--net/smc/smc_pnet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
index be03f1260d59..014d91b9778e 100644
--- a/net/smc/smc_pnet.c
+++ b/net/smc/smc_pnet.c
@@ -32,7 +32,7 @@
static struct net_device *pnet_find_base_ndev(struct net_device *ndev);
-static struct nla_policy smc_pnet_policy[SMC_PNETID_MAX + 1] = {
+static const struct nla_policy smc_pnet_policy[SMC_PNETID_MAX + 1] = {
[SMC_PNETID_NAME] = {
.type = NLA_NUL_STRING,
.len = SMC_MAX_PNETID_LEN