public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/smc: mark smc_pnet_policy as const
@ 2020-05-25 15:31 Dmitry Vyukov
  2020-05-27  3:19 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Vyukov @ 2020-05-25 15:31 UTC (permalink / raw)
  To: ubraun, kgraul, linux-s390
  Cc: netdev, davem, kuba, linux-kernel, Dmitry Vyukov

Netlink policies are generally declared as const.
This is safer and prevents potential bugs.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
---
 net/smc/smc_pnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
index 2a5ed47c3e08..45d5ea570293 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
-- 
2.27.0.rc0.183.gde8f92d652-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-27  3:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-25 15:31 [PATCH] net/smc: mark smc_pnet_policy as const Dmitry Vyukov
2020-05-27  3:19 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox