Commit 4534de83 authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller
Browse files

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f84f771d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2644,7 +2644,7 @@ static int team_nl_cmd_port_list_get(struct sk_buff *skb,
	return err;
}

static struct genl_ops team_nl_ops[] = {
static const struct genl_ops team_nl_ops[] = {
	{
		.cmd = TEAM_CMD_NOOP,
		.doit = team_nl_cmd_noop,
+1 −1
Original line number Diff line number Diff line
@@ -2097,7 +2097,7 @@ out:
}

/* Generic Netlink operations array */
static struct genl_ops hwsim_ops[] = {
static const struct genl_ops hwsim_ops[] = {
	{
		.cmd = HWSIM_CMD_REGISTER,
		.policy = hwsim_genl_policy,
+1 −1
Original line number Diff line number Diff line
@@ -673,7 +673,7 @@ err:
	nlmsg_free(rep_skb);
}

static struct genl_ops taskstats_ops[] = {
static const struct genl_ops taskstats_ops[] = {
	{
		.cmd		= TASKSTATS_CMD_GET,
		.doit		= taskstats_user_cmd,
+1 −1
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ out:
	return NOTIFY_DONE;
}

static struct genl_ops dropmon_ops[] = {
static const struct genl_ops dropmon_ops[] = {
	{
		.cmd = NET_DM_CMD_CONFIG,
		.doit = net_dm_cmd_config,
+1 −1
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ fail:
}


static struct genl_ops hsr_ops[] = {
static const struct genl_ops hsr_ops[] = {
	{
		.cmd = HSR_C_GET_NODE_STATUS,
		.flags = 0,
Loading