aboutsummaryrefslogtreecommitdiffstats
path: root/net/dcb
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2015-10-07 17:27:44 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-09 10:52:27 -0400
commit36b9ad8084bd7ecf6d2241beca23e71f5f4b0cf1 (patch)
tree7a8b628963dc81fe3caf60180b51d076a9f8d1fd /net/dcb
parentb6191aeeec1045decb5964e6b5e8c314f5982c85 (diff)
net/dcb: make dcbnl.c explicitly non-modular
The Kconfig currently controlling compilation of this code is: net/dcb/Kconfig:config DCB net/dcb/Kconfig: bool "Data Center Bridging support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We can change to one of the other priority initcalls (subsys?) at any later date, if desired. We also delete the MODULE_LICENSE tag etc. since all that information is (or is now) already contained at the top of the file in the comments. Cc: "David S. Miller" <davem@davemloft.net> Cc: Or Gerlitz <ogerlitz@mellanox.com> Cc: Anish Bhatt <anish@chelsio.com> Cc: John Fastabend <john.r.fastabend@intel.com> Cc: Shani Michaeli <shanim@mellanox.com> Cc: netdev@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dcb')
-rw-r--r--net/dcb/dcbnl.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index 5b21f6f88e97..4f6c1862dfd2 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -13,6 +13,7 @@
13 * You should have received a copy of the GNU General Public License along with 13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, see <http://www.gnu.org/licenses/>. 14 * this program; if not, see <http://www.gnu.org/licenses/>.
15 * 15 *
16 * Description: Data Center Bridging netlink interface
16 * Author: Lucy Liu <lucy.liu@intel.com> 17 * Author: Lucy Liu <lucy.liu@intel.com>
17 */ 18 */
18 19
@@ -24,7 +25,7 @@
24#include <linux/dcbnl.h> 25#include <linux/dcbnl.h>
25#include <net/dcbevent.h> 26#include <net/dcbevent.h>
26#include <linux/rtnetlink.h> 27#include <linux/rtnetlink.h>
27#include <linux/module.h> 28#include <linux/init.h>
28#include <net/sock.h> 29#include <net/sock.h>
29 30
30/* Data Center Bridging (DCB) is a collection of Ethernet enhancements 31/* Data Center Bridging (DCB) is a collection of Ethernet enhancements
@@ -48,10 +49,6 @@
48 * features for capable devices. 49 * features for capable devices.
49 */ 50 */
50 51
51MODULE_AUTHOR("Lucy Liu, <lucy.liu@intel.com>");
52MODULE_DESCRIPTION("Data Center Bridging netlink interface");
53MODULE_LICENSE("GPL");
54
55/**************** DCB attribute policies *************************************/ 52/**************** DCB attribute policies *************************************/
56 53
57/* DCB netlink attributes policy */ 54/* DCB netlink attributes policy */
@@ -1935,19 +1932,6 @@ int dcb_ieee_delapp(struct net_device *dev, struct dcb_app *del)
1935} 1932}
1936EXPORT_SYMBOL(dcb_ieee_delapp); 1933EXPORT_SYMBOL(dcb_ieee_delapp);
1937 1934
1938static void dcb_flushapp(void)
1939{
1940 struct dcb_app_type *app;
1941 struct dcb_app_type *tmp;
1942
1943 spin_lock_bh(&dcb_lock);
1944 list_for_each_entry_safe(app, tmp, &dcb_app_list, list) {
1945 list_del(&app->list);
1946 kfree(app);
1947 }
1948 spin_unlock_bh(&dcb_lock);
1949}
1950
1951static int __init dcbnl_init(void) 1935static int __init dcbnl_init(void)
1952{ 1936{
1953 INIT_LIST_HEAD(&dcb_app_list); 1937 INIT_LIST_HEAD(&dcb_app_list);
@@ -1957,12 +1941,4 @@ static int __init dcbnl_init(void)
1957 1941
1958 return 0; 1942 return 0;
1959} 1943}
1960module_init(dcbnl_init); 1944device_initcall(dcbnl_init);
1961
1962static void __exit dcbnl_exit(void)
1963{
1964 rtnl_unregister(PF_UNSPEC, RTM_GETDCB);
1965 rtnl_unregister(PF_UNSPEC, RTM_SETDCB);
1966 dcb_flushapp();
1967}
1968module_exit(dcbnl_exit);