Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Paul Gortmaker and committed by
David S. Miller
36b9ad80 b6191aee

+3 -27
+3 -27
net/dcb/dcbnl.c
··· 13 13 * You should have received a copy of the GNU General Public License along with 14 14 * this program; if not, see <http://www.gnu.org/licenses/>. 15 15 * 16 + * Description: Data Center Bridging netlink interface 16 17 * Author: Lucy Liu <lucy.liu@intel.com> 17 18 */ 18 19 ··· 25 24 #include <linux/dcbnl.h> 26 25 #include <net/dcbevent.h> 27 26 #include <linux/rtnetlink.h> 28 - #include <linux/module.h> 27 + #include <linux/init.h> 29 28 #include <net/sock.h> 30 29 31 30 /* Data Center Bridging (DCB) is a collection of Ethernet enhancements ··· 48 47 * This file implements an rtnetlink interface to allow configuration of DCB 49 48 * features for capable devices. 50 49 */ 51 - 52 - MODULE_AUTHOR("Lucy Liu, <lucy.liu@intel.com>"); 53 - MODULE_DESCRIPTION("Data Center Bridging netlink interface"); 54 - MODULE_LICENSE("GPL"); 55 50 56 51 /**************** DCB attribute policies *************************************/ 57 52 ··· 1932 1935 } 1933 1936 EXPORT_SYMBOL(dcb_ieee_delapp); 1934 1937 1935 - static void dcb_flushapp(void) 1936 - { 1937 - struct dcb_app_type *app; 1938 - struct dcb_app_type *tmp; 1939 - 1940 - spin_lock_bh(&dcb_lock); 1941 - list_for_each_entry_safe(app, tmp, &dcb_app_list, list) { 1942 - list_del(&app->list); 1943 - kfree(app); 1944 - } 1945 - spin_unlock_bh(&dcb_lock); 1946 - } 1947 - 1948 1938 static int __init dcbnl_init(void) 1949 1939 { 1950 1940 INIT_LIST_HEAD(&dcb_app_list); ··· 1941 1957 1942 1958 return 0; 1943 1959 } 1944 - module_init(dcbnl_init); 1945 - 1946 - static void __exit dcbnl_exit(void) 1947 - { 1948 - rtnl_unregister(PF_UNSPEC, RTM_GETDCB); 1949 - rtnl_unregister(PF_UNSPEC, RTM_SETDCB); 1950 - dcb_flushapp(); 1951 - } 1952 - module_exit(dcbnl_exit); 1960 + device_initcall(dcbnl_init);