Skip to content

Commit

Permalink
net/sched: make sch_blackhole.c explicitly non-modular
Browse files Browse the repository at this point in the history
The Kconfig currently controlling compilation of this code is:

net/sched/Kconfig:menuconfig NET_SCHED
net/sched/Kconfig:      bool "QoS and/or fair queueing"

...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 since all that information
is already contained at the top of the file in the comments.

Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paul Gortmaker authored and David S. Miller committed Oct 9, 2015
1 parent 36b9ad8 commit 075640e
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions net/sched/sch_blackhole.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Note: Quantum tunneling is not supported.
*/

#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
Expand All @@ -37,17 +37,8 @@ static struct Qdisc_ops blackhole_qdisc_ops __read_mostly = {
.owner = THIS_MODULE,
};

static int __init blackhole_module_init(void)
static int __init blackhole_init(void)
{
return register_qdisc(&blackhole_qdisc_ops);
}

static void __exit blackhole_module_exit(void)
{
unregister_qdisc(&blackhole_qdisc_ops);
}

module_init(blackhole_module_init)
module_exit(blackhole_module_exit)

MODULE_LICENSE("GPL");
device_initcall(blackhole_init)

0 comments on commit 075640e

Please sign in to comment.