summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-10-04 21:13:36 -0700
committerDavid S. Miller <davem@davemloft.net>2020-10-04 21:13:36 -0700
commitc2568c8c9e636a56abf31da4b28b65d3ded02524 (patch)
treea0df8543af846d2289f60e135fad2509602a555e
parentf5083d0cee08a4b87d5d7a5c57f60ec128bff997 (diff)
parentb980b313e5a2ace214322af9f3183c269b5c55ae (diff)
Merge branch 'net-Constify-struct-genl_small_ops'
Rikard Falkeborn says: ==================== net: Constify struct genl_small_ops Make a couple of static struct genl_small_ops const to allow the compiler to put them in read-only memory. Patches are independent. v2: Rebase on net-next, genl_ops -> genl_small_ops ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/mptcp/pm_netlink.c2
-rw-r--r--net/openvswitch/conntrack.c2
-rw-r--r--net/openvswitch/meter.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 9f9cd41b7733..0d6f3d912891 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,
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 18af10b7ef0e..e6fe26a9c892 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -2231,7 +2231,7 @@ exit_err:
return err;
}
-static struct genl_small_ops ct_limit_genl_ops[] = {
+static const struct genl_small_ops ct_limit_genl_ops[] = {
{ .cmd = OVS_CT_LIMIT_CMD_SET,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index 50541e874726..8fbefd52af7f 100644
--- a/net/openvswitch/meter.c
+++ b/net/openvswitch/meter.c
@@ -672,7 +672,7 @@ bool ovs_meter_execute(struct datapath *dp, struct sk_buff *skb,
return false;
}
-static struct genl_small_ops dp_meter_genl_ops[] = {
+static const struct genl_small_ops dp_meter_genl_ops[] = {
{ .cmd = OVS_METER_CMD_FEATURES,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.flags = 0, /* OK for unprivileged users. */