From: Rikard Falkeborn Date: Sun, 4 Oct 2020 23:44:16 +0000 (+0200) Subject: mptcp: Constify mptcp_pm_ops X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=674d3ab94977684392200cdb193968341d452aae;p=linux.git mptcp: Constify mptcp_pm_ops The only usages of mptcp_pm_ops is to assign its address to the small_ops field of the genl_family struct, which is a const pointer, and applying ARRAY_SIZE() on it. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller --- diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 9f9cd41b7733e..0d6f3d912891a 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1054,7 +1054,7 @@ fail: return -EMSGSIZE; } -static struct genl_small_ops mptcp_pm_ops[] = { +static const struct genl_small_ops mptcp_pm_ops[] = { { .cmd = MPTCP_PM_CMD_ADD_ADDR, .doit = mptcp_nl_cmd_add_addr,