diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-11-14 11:14:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-14 17:10:41 -0500 |
commit | 4534de8305b3f1460a527a0cda0e3dc2224c6f0c (patch) | |
tree | 8d140f8ea1c583a4f4ab4e7dc74a3d5dfdaa9ddc /net/netlabel | |
parent | f84f771d942182e39a56ec2989d6a67d3ca33a13 (diff) |
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 <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlabel')
-rw-r--r-- | net/netlabel/netlabel_cipso_v4.c | 2 | ||||
-rw-r--r-- | net/netlabel/netlabel_mgmt.c | 2 | ||||
-rw-r--r-- | net/netlabel/netlabel_unlabeled.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index a1100640495d..706691739b99 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c | |||
@@ -737,7 +737,7 @@ static int netlbl_cipsov4_remove(struct sk_buff *skb, struct genl_info *info) | |||
737 | * NetLabel Generic NETLINK Command Definitions | 737 | * NetLabel Generic NETLINK Command Definitions |
738 | */ | 738 | */ |
739 | 739 | ||
740 | static struct genl_ops netlbl_cipsov4_ops[] = { | 740 | static const struct genl_ops netlbl_cipsov4_ops[] = { |
741 | { | 741 | { |
742 | .cmd = NLBL_CIPSOV4_C_ADD, | 742 | .cmd = NLBL_CIPSOV4_C_ADD, |
743 | .flags = GENL_ADMIN_PERM, | 743 | .flags = GENL_ADMIN_PERM, |
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index dd1c37d7acbc..7de6f660b80a 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
@@ -705,7 +705,7 @@ version_failure: | |||
705 | * NetLabel Generic NETLINK Command Definitions | 705 | * NetLabel Generic NETLINK Command Definitions |
706 | */ | 706 | */ |
707 | 707 | ||
708 | static struct genl_ops netlbl_mgmt_genl_ops[] = { | 708 | static const struct genl_ops netlbl_mgmt_genl_ops[] = { |
709 | { | 709 | { |
710 | .cmd = NLBL_MGMT_C_ADD, | 710 | .cmd = NLBL_MGMT_C_ADD, |
711 | .flags = GENL_ADMIN_PERM, | 711 | .flags = GENL_ADMIN_PERM, |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 8f0897407a2c..76ee9252daa7 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -1323,7 +1323,7 @@ unlabel_staticlistdef_return: | |||
1323 | * NetLabel Generic NETLINK Command Definitions | 1323 | * NetLabel Generic NETLINK Command Definitions |
1324 | */ | 1324 | */ |
1325 | 1325 | ||
1326 | static struct genl_ops netlbl_unlabel_genl_ops[] = { | 1326 | static const struct genl_ops netlbl_unlabel_genl_ops[] = { |
1327 | { | 1327 | { |
1328 | .cmd = NLBL_UNLABEL_C_STATICADD, | 1328 | .cmd = NLBL_UNLABEL_C_STATICADD, |
1329 | .flags = GENL_ADMIN_PERM, | 1329 | .flags = GENL_ADMIN_PERM, |