diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/drop_monitor.c | 3 | ||||
-rw-r--r-- | net/hsr/hsr_netlink.c | 3 | ||||
-rw-r--r-- | net/ieee802154/netlink.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_metrics.c | 3 | ||||
-rw-r--r-- | net/irda/irnetlink.c | 3 | ||||
-rw-r--r-- | net/l2tp/l2tp_netlink.c | 7 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 2 | ||||
-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 | ||||
-rw-r--r-- | net/netlink/genetlink.c | 14 | ||||
-rw-r--r-- | net/nfc/netlink.c | 3 | ||||
-rw-r--r-- | net/openvswitch/datapath.c | 5 | ||||
-rw-r--r-- | net/tipc/netlink.c | 11 | ||||
-rw-r--r-- | net/wimax/stack.c | 4 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 3 |
16 files changed, 31 insertions, 39 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index f9fe2f22d20b..0efc5028ba9d 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
@@ -365,8 +365,7 @@ static int __init init_net_drop_monitor(void) | |||
365 | } | 365 | } |
366 | 366 | ||
367 | rc = genl_register_family_with_ops(&net_drop_monitor_family, | 367 | rc = genl_register_family_with_ops(&net_drop_monitor_family, |
368 | dropmon_ops, | 368 | dropmon_ops); |
369 | ARRAY_SIZE(dropmon_ops)); | ||
370 | if (rc) { | 369 | if (rc) { |
371 | pr_err("Could not create drop monitor netlink family\n"); | 370 | pr_err("Could not create drop monitor netlink family\n"); |
372 | return rc; | 371 | return rc; |
diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c index 3b9205d2afc4..f182260be76d 100644 --- a/net/hsr/hsr_netlink.c +++ b/net/hsr/hsr_netlink.c | |||
@@ -414,8 +414,7 @@ int __init hsr_netlink_init(void) | |||
414 | if (rc) | 414 | if (rc) |
415 | goto fail_rtnl_link_register; | 415 | goto fail_rtnl_link_register; |
416 | 416 | ||
417 | rc = genl_register_family_with_ops(&hsr_genl_family, hsr_ops, | 417 | rc = genl_register_family_with_ops(&hsr_genl_family, hsr_ops); |
418 | ARRAY_SIZE(hsr_ops)); | ||
419 | if (rc) | 418 | if (rc) |
420 | goto fail_genl_register_family; | 419 | goto fail_genl_register_family; |
421 | 420 | ||
diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c index 3ffcdbb56aab..1a81709a4717 100644 --- a/net/ieee802154/netlink.c +++ b/net/ieee802154/netlink.c | |||
@@ -129,8 +129,7 @@ int __init ieee802154_nl_init(void) | |||
129 | { | 129 | { |
130 | int rc; | 130 | int rc; |
131 | 131 | ||
132 | rc = genl_register_family_with_ops(&nl802154_family, ieee8021154_ops, | 132 | rc = genl_register_family_with_ops(&nl802154_family, ieee8021154_ops); |
133 | ARRAY_SIZE(ieee8021154_ops)); | ||
134 | if (rc) | 133 | if (rc) |
135 | return rc; | 134 | return rc; |
136 | 135 | ||
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index 8c121b523eee..06493736fbc8 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c | |||
@@ -1082,8 +1082,7 @@ void __init tcp_metrics_init(void) | |||
1082 | if (ret < 0) | 1082 | if (ret < 0) |
1083 | goto cleanup; | 1083 | goto cleanup; |
1084 | ret = genl_register_family_with_ops(&tcp_metrics_nl_family, | 1084 | ret = genl_register_family_with_ops(&tcp_metrics_nl_family, |
1085 | tcp_metrics_nl_ops, | 1085 | tcp_metrics_nl_ops); |
1086 | ARRAY_SIZE(tcp_metrics_nl_ops)); | ||
1087 | if (ret < 0) | 1086 | if (ret < 0) |
1088 | goto cleanup_subsys; | 1087 | goto cleanup_subsys; |
1089 | return; | 1088 | return; |
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c index bf5d7d476dae..a37b81fe0479 100644 --- a/net/irda/irnetlink.c +++ b/net/irda/irnetlink.c | |||
@@ -149,8 +149,7 @@ static const struct genl_ops irda_nl_ops[] = { | |||
149 | 149 | ||
150 | int irda_nl_register(void) | 150 | int irda_nl_register(void) |
151 | { | 151 | { |
152 | return genl_register_family_with_ops(&irda_nl_family, | 152 | return genl_register_family_with_ops(&irda_nl_family, irda_nl_ops); |
153 | irda_nl_ops, ARRAY_SIZE(irda_nl_ops)); | ||
154 | } | 153 | } |
155 | 154 | ||
156 | void irda_nl_unregister(void) | 155 | void irda_nl_unregister(void) |
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c index 57db66e24f1f..4cfd722e9153 100644 --- a/net/l2tp/l2tp_netlink.c +++ b/net/l2tp/l2tp_netlink.c | |||
@@ -887,13 +887,8 @@ EXPORT_SYMBOL_GPL(l2tp_nl_unregister_ops); | |||
887 | 887 | ||
888 | static int l2tp_nl_init(void) | 888 | static int l2tp_nl_init(void) |
889 | { | 889 | { |
890 | int err; | ||
891 | |||
892 | pr_info("L2TP netlink interface\n"); | 890 | pr_info("L2TP netlink interface\n"); |
893 | err = genl_register_family_with_ops(&l2tp_nl_family, l2tp_nl_ops, | 891 | return genl_register_family_with_ops(&l2tp_nl_family, l2tp_nl_ops); |
894 | ARRAY_SIZE(l2tp_nl_ops)); | ||
895 | |||
896 | return err; | ||
897 | } | 892 | } |
898 | 893 | ||
899 | static void l2tp_nl_cleanup(void) | 894 | static void l2tp_nl_cleanup(void) |
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index fc8a04ed8854..393498704691 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -3666,7 +3666,7 @@ static const struct genl_ops ip_vs_genl_ops[] __read_mostly = { | |||
3666 | static int __init ip_vs_genl_register(void) | 3666 | static int __init ip_vs_genl_register(void) |
3667 | { | 3667 | { |
3668 | return genl_register_family_with_ops(&ip_vs_genl_family, | 3668 | return genl_register_family_with_ops(&ip_vs_genl_family, |
3669 | ip_vs_genl_ops, ARRAY_SIZE(ip_vs_genl_ops)); | 3669 | ip_vs_genl_ops); |
3670 | } | 3670 | } |
3671 | 3671 | ||
3672 | static void ip_vs_genl_unregister(void) | 3672 | static void ip_vs_genl_unregister(void) |
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index 706691739b99..69345cebe3a3 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c | |||
@@ -783,5 +783,5 @@ static const struct genl_ops netlbl_cipsov4_ops[] = { | |||
783 | int __init netlbl_cipsov4_genl_init(void) | 783 | int __init netlbl_cipsov4_genl_init(void) |
784 | { | 784 | { |
785 | return genl_register_family_with_ops(&netlbl_cipsov4_gnl_family, | 785 | return genl_register_family_with_ops(&netlbl_cipsov4_gnl_family, |
786 | netlbl_cipsov4_ops, ARRAY_SIZE(netlbl_cipsov4_ops)); | 786 | netlbl_cipsov4_ops); |
787 | } | 787 | } |
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index 7de6f660b80a..8ef83ee97c6a 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
@@ -779,5 +779,5 @@ static const struct genl_ops netlbl_mgmt_genl_ops[] = { | |||
779 | int __init netlbl_mgmt_genl_init(void) | 779 | int __init netlbl_mgmt_genl_init(void) |
780 | { | 780 | { |
781 | return genl_register_family_with_ops(&netlbl_mgmt_gnl_family, | 781 | return genl_register_family_with_ops(&netlbl_mgmt_gnl_family, |
782 | netlbl_mgmt_genl_ops, ARRAY_SIZE(netlbl_mgmt_genl_ops)); | 782 | netlbl_mgmt_genl_ops); |
783 | } | 783 | } |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 76ee9252daa7..43817d73ccf9 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -1397,7 +1397,7 @@ static const struct genl_ops netlbl_unlabel_genl_ops[] = { | |||
1397 | int __init netlbl_unlabel_genl_init(void) | 1397 | int __init netlbl_unlabel_genl_init(void) |
1398 | { | 1398 | { |
1399 | return genl_register_family_with_ops(&netlbl_unlabel_gnl_family, | 1399 | return genl_register_family_with_ops(&netlbl_unlabel_gnl_family, |
1400 | netlbl_unlabel_genl_ops, ARRAY_SIZE(netlbl_unlabel_genl_ops)); | 1400 | netlbl_unlabel_genl_ops); |
1401 | } | 1401 | } |
1402 | 1402 | ||
1403 | /* | 1403 | /* |
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index f54215d7b8f3..c68ce73619b5 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
@@ -906,11 +906,13 @@ static int genl_ctrl_event(int event, void *data) | |||
906 | return 0; | 906 | return 0; |
907 | } | 907 | } |
908 | 908 | ||
909 | static struct genl_ops genl_ctrl_ops = { | 909 | static struct genl_ops genl_ctrl_ops[] = { |
910 | .cmd = CTRL_CMD_GETFAMILY, | 910 | { |
911 | .doit = ctrl_getfamily, | 911 | .cmd = CTRL_CMD_GETFAMILY, |
912 | .dumpit = ctrl_dumpfamily, | 912 | .doit = ctrl_getfamily, |
913 | .policy = ctrl_policy, | 913 | .dumpit = ctrl_dumpfamily, |
914 | .policy = ctrl_policy, | ||
915 | }, | ||
914 | }; | 916 | }; |
915 | 917 | ||
916 | static struct genl_multicast_group notify_grp = { | 918 | static struct genl_multicast_group notify_grp = { |
@@ -954,7 +956,7 @@ static int __init genl_init(void) | |||
954 | for (i = 0; i < GENL_FAM_TAB_SIZE; i++) | 956 | for (i = 0; i < GENL_FAM_TAB_SIZE; i++) |
955 | INIT_LIST_HEAD(&family_ht[i]); | 957 | INIT_LIST_HEAD(&family_ht[i]); |
956 | 958 | ||
957 | err = genl_register_family_with_ops(&genl_ctrl, &genl_ctrl_ops, 1); | 959 | err = genl_register_family_with_ops(&genl_ctrl, genl_ctrl_ops); |
958 | if (err < 0) | 960 | if (err < 0) |
959 | goto problem; | 961 | goto problem; |
960 | 962 | ||
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index f5585611c098..fe6760d328a0 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c | |||
@@ -1536,8 +1536,7 @@ int __init nfc_genl_init(void) | |||
1536 | { | 1536 | { |
1537 | int rc; | 1537 | int rc; |
1538 | 1538 | ||
1539 | rc = genl_register_family_with_ops(&nfc_genl_family, nfc_genl_ops, | 1539 | rc = genl_register_family_with_ops(&nfc_genl_family, nfc_genl_ops); |
1540 | ARRAY_SIZE(nfc_genl_ops)); | ||
1541 | if (rc) | 1540 | if (rc) |
1542 | return rc; | 1541 | return rc; |
1543 | 1542 | ||
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 91e1c927a465..8ec8b73033e0 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -1817,8 +1817,9 @@ static int dp_register_genl(void) | |||
1817 | for (i = 0; i < ARRAY_SIZE(dp_genl_families); i++) { | 1817 | for (i = 0; i < ARRAY_SIZE(dp_genl_families); i++) { |
1818 | const struct genl_family_and_ops *f = &dp_genl_families[i]; | 1818 | const struct genl_family_and_ops *f = &dp_genl_families[i]; |
1819 | 1819 | ||
1820 | err = genl_register_family_with_ops(f->family, f->ops, | 1820 | f->family->ops = f->ops; |
1821 | f->n_ops); | 1821 | f->family->n_ops = f->n_ops; |
1822 | err = genl_register_family(f->family); | ||
1822 | if (err) | 1823 | if (err) |
1823 | goto error; | 1824 | goto error; |
1824 | n_registered++; | 1825 | n_registered++; |
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c index 8bcd4985d0fb..9f72a6376362 100644 --- a/net/tipc/netlink.c +++ b/net/tipc/netlink.c | |||
@@ -76,9 +76,11 @@ static struct genl_family tipc_genl_family = { | |||
76 | .maxattr = 0, | 76 | .maxattr = 0, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static struct genl_ops tipc_genl_ops = { | 79 | static struct genl_ops tipc_genl_ops[] = { |
80 | .cmd = TIPC_GENL_CMD, | 80 | { |
81 | .doit = handle_cmd, | 81 | .cmd = TIPC_GENL_CMD, |
82 | .doit = handle_cmd, | ||
83 | }, | ||
82 | }; | 84 | }; |
83 | 85 | ||
84 | static int tipc_genl_family_registered; | 86 | static int tipc_genl_family_registered; |
@@ -87,8 +89,7 @@ int tipc_netlink_start(void) | |||
87 | { | 89 | { |
88 | int res; | 90 | int res; |
89 | 91 | ||
90 | res = genl_register_family_with_ops(&tipc_genl_family, | 92 | res = genl_register_family_with_ops(&tipc_genl_family, tipc_genl_ops); |
91 | &tipc_genl_ops, 1); | ||
92 | if (res) { | 93 | if (res) { |
93 | pr_err("Failed to register netlink interface\n"); | 94 | pr_err("Failed to register netlink interface\n"); |
94 | return res; | 95 | return res; |
diff --git a/net/wimax/stack.c b/net/wimax/stack.c index 47170c9495f1..6328afe90319 100644 --- a/net/wimax/stack.c +++ b/net/wimax/stack.c | |||
@@ -597,8 +597,8 @@ int __init wimax_subsys_init(void) | |||
597 | 597 | ||
598 | snprintf(wimax_gnl_family.name, sizeof(wimax_gnl_family.name), | 598 | snprintf(wimax_gnl_family.name, sizeof(wimax_gnl_family.name), |
599 | "WiMAX"); | 599 | "WiMAX"); |
600 | result = genl_register_family_with_ops(&wimax_gnl_family, wimax_gnl_ops, | 600 | result = genl_register_family_with_ops(&wimax_gnl_family, |
601 | ARRAY_SIZE(wimax_gnl_ops)); | 601 | wimax_gnl_ops); |
602 | if (unlikely(result < 0)) { | 602 | if (unlikely(result < 0)) { |
603 | printk(KERN_ERR "cannot register generic netlink family: %d\n", | 603 | printk(KERN_ERR "cannot register generic netlink family: %d\n", |
604 | result); | 604 | result); |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 58c43c8e149f..1b6c5dd4dccf 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -11329,8 +11329,7 @@ int nl80211_init(void) | |||
11329 | { | 11329 | { |
11330 | int err; | 11330 | int err; |
11331 | 11331 | ||
11332 | err = genl_register_family_with_ops(&nl80211_fam, | 11332 | err = genl_register_family_with_ops(&nl80211_fam, nl80211_ops); |
11333 | nl80211_ops, ARRAY_SIZE(nl80211_ops)); | ||
11334 | if (err) | 11333 | if (err) |
11335 | return err; | 11334 | return err; |
11336 | 11335 | ||