mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
genetlink: make all genl_ops users const
Now that genl_ops are no longer modified in place when
registering, they can be made const. This patch was done
mostly with spatch:
@@
identifier ops;
@@
+const
struct genl_ops ops[] = {
...
};
(except the struct thing in net/openvswitch/datapath.c)
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
f84f771d94
commit
4534de8305
17 changed files with 21 additions and 21 deletions
|
|
@ -557,7 +557,7 @@ static const struct nla_policy packet_policy[OVS_PACKET_ATTR_MAX + 1] = {
|
|||
[OVS_PACKET_ATTR_ACTIONS] = { .type = NLA_NESTED },
|
||||
};
|
||||
|
||||
static struct genl_ops dp_packet_genl_ops[] = {
|
||||
static const struct genl_ops dp_packet_genl_ops[] = {
|
||||
{ .cmd = OVS_PACKET_CMD_EXECUTE,
|
||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||
.policy = packet_policy,
|
||||
|
|
@ -1034,7 +1034,7 @@ static int ovs_flow_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
return skb->len;
|
||||
}
|
||||
|
||||
static struct genl_ops dp_flow_genl_ops[] = {
|
||||
static const struct genl_ops dp_flow_genl_ops[] = {
|
||||
{ .cmd = OVS_FLOW_CMD_NEW,
|
||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||
.policy = flow_policy,
|
||||
|
|
@ -1392,7 +1392,7 @@ static int ovs_dp_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
return skb->len;
|
||||
}
|
||||
|
||||
static struct genl_ops dp_datapath_genl_ops[] = {
|
||||
static const struct genl_ops dp_datapath_genl_ops[] = {
|
||||
{ .cmd = OVS_DP_CMD_NEW,
|
||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||
.policy = datapath_policy,
|
||||
|
|
@ -1753,7 +1753,7 @@ out:
|
|||
return skb->len;
|
||||
}
|
||||
|
||||
static struct genl_ops dp_vport_genl_ops[] = {
|
||||
static const struct genl_ops dp_vport_genl_ops[] = {
|
||||
{ .cmd = OVS_VPORT_CMD_NEW,
|
||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||
.policy = vport_policy,
|
||||
|
|
@ -1779,7 +1779,7 @@ static struct genl_ops dp_vport_genl_ops[] = {
|
|||
|
||||
struct genl_family_and_ops {
|
||||
struct genl_family *family;
|
||||
struct genl_ops *ops;
|
||||
const struct genl_ops *ops;
|
||||
int n_ops;
|
||||
struct genl_multicast_group *group;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue