diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2020-10-05 01:44:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-10-04 21:13:36 -0700 |
commit | b980b313e5a2ace214322af9f3183c269b5c55ae (patch) | |
tree | a0df8543af846d2289f60e135fad2509602a555e /net/openvswitch/conntrack.c | |
parent | 674d3ab94977684392200cdb193968341d452aae (diff) | |
download | lwn-b980b313e5a2ace214322af9f3183c269b5c55ae.tar.gz lwn-b980b313e5a2ace214322af9f3183c269b5c55ae.zip |
net: openvswitch: Constify static struct genl_small_ops
The only usage of these is to assign their address to the small_ops field
in the genl_family struct, which is a const pointer, and applying
ARRAY_SIZE() on them. Make them const to allow the compiler to put them
in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/conntrack.c')
-rw-r--r-- | net/openvswitch/conntrack.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |