From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <netdev@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH-next v2 3/4] net/sched: make sch_blackhole.c explicitly non-modular
Date: Wed, 7 Oct 2015 17:27:45 -0400 [thread overview]
Message-ID: <1444253266-22012-4-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1444253266-22012-1-git-send-email-paul.gortmaker@windriver.com>
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>
---
net/sched/sch_blackhole.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/net/sched/sch_blackhole.c b/net/sched/sch_blackhole.c
index 094a874b48bc..3fee70d9814f 100644
--- a/net/sched/sch_blackhole.c
+++ b/net/sched/sch_blackhole.c
@@ -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>
@@ -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)
--
2.6.0.rc3
next prev parent reply other threads:[~2015-10-07 21:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 21:27 [PATCH-next v2 0/4] make non-modular code explicitly non-modular Paul Gortmaker
2015-10-07 21:27 ` [PATCH-next v2 1/4] net/core: make sock_diag.c " Paul Gortmaker
2015-10-07 21:27 ` [PATCH-next v2 2/4] net/dcb: make dcbnl.c " Paul Gortmaker
2015-10-07 21:27 ` Paul Gortmaker [this message]
2015-10-07 21:47 ` [PATCH-next v2 3/4] net/sched: make sch_blackhole.c " Cong Wang
2015-10-08 22:59 ` Paul Gortmaker
2015-10-07 21:27 ` [PATCH-next v2 4/4] drivers/net/ethernet: make ti/cpsw-phy-sel.c " Paul Gortmaker
2015-10-09 14:52 ` [PATCH-next v2 0/4] make non-modular code " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444253266-22012-4-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).