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>
This commit is contained in:
commit
c2568c8c9e
@ -1054,7 +1054,7 @@ fail:
|
|||||||
return -EMSGSIZE;
|
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,
|
.cmd = MPTCP_PM_CMD_ADD_ADDR,
|
||||||
.doit = mptcp_nl_cmd_add_addr,
|
.doit = mptcp_nl_cmd_add_addr,
|
||||||
|
@ -2231,7 +2231,7 @@ exit_err:
|
|||||||
return 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,
|
{ .cmd = OVS_CT_LIMIT_CMD_SET,
|
||||||
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
||||||
|
@ -672,7 +672,7 @@ bool ovs_meter_execute(struct datapath *dp, struct sk_buff *skb,
|
|||||||
return false;
|
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,
|
{ .cmd = OVS_METER_CMD_FEATURES,
|
||||||
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0, /* OK for unprivileged users. */
|
.flags = 0, /* OK for unprivileged users. */
|
||||||
|
Loading…
Reference in New Issue
Block a user