Commit d313a47f authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] Remove all uses of '#ifdef MODULE_PARM' from kernel

I got sidetracked (I do that a lot ;-) and noticed that there are only
eight files in 2.6 that have code like:

#ifdef MODULE_PARAM
MODULE_PARAM(foo, "i");
#endif

which I think is old cruft from 2.1.x times.  Following patch removes
all those eight (six in netfilter, one net driver and one SCSI driver).
parent 8133b98d
...@@ -776,14 +776,12 @@ static int irq[MAX_NE_CARDS]; ...@@ -776,14 +776,12 @@ static int irq[MAX_NE_CARDS];
static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */ static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#ifdef MODULE_PARM
MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NE_CARDS) "i"); MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_NE_CARDS) "i"); MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
MODULE_PARM(bad, "1-" __MODULE_STRING(MAX_NE_CARDS) "i"); MODULE_PARM(bad, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
MODULE_PARM_DESC(io, "(ignored)"); MODULE_PARM_DESC(io, "(ignored)");
MODULE_PARM_DESC(irq, "(ignored)"); MODULE_PARM_DESC(irq, "(ignored)");
MODULE_PARM_DESC(bad, "(ignored)"); MODULE_PARM_DESC(bad, "(ignored)");
#endif
/* Module code fixed by David Weinehall */ /* Module code fixed by David Weinehall */
......
...@@ -186,9 +186,7 @@ static char *setup_args[] = { "", "", "", "", "", "", "", "", "" }; ...@@ -186,9 +186,7 @@ static char *setup_args[] = { "", "", "", "", "", "", "", "", "" };
/* filled in by 'insmod' */ /* filled in by 'insmod' */
static char *setup_strings = 0; static char *setup_strings = 0;
#ifdef MODULE_PARM
MODULE_PARM(setup_strings, "s"); MODULE_PARM(setup_strings, "s");
#endif
static inline uchar read_3393(struct IN2000_hostdata *hostdata, uchar reg_num) static inline uchar read_3393(struct IN2000_hostdata *hostdata, uchar reg_num)
{ {
......
...@@ -33,9 +33,7 @@ struct module *ip_conntrack_ftp = THIS_MODULE; ...@@ -33,9 +33,7 @@ struct module *ip_conntrack_ftp = THIS_MODULE;
#define MAX_PORTS 8 #define MAX_PORTS 8
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
static int ports_c; static int ports_c;
#ifdef MODULE_PARM
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i");
#endif
static int loose; static int loose;
MODULE_PARM(loose, "i"); MODULE_PARM(loose, "i");
......
...@@ -44,14 +44,12 @@ static char irc_buffer[65536]; ...@@ -44,14 +44,12 @@ static char irc_buffer[65536];
MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
MODULE_DESCRIPTION("IRC (DCC) connection tracking helper"); MODULE_DESCRIPTION("IRC (DCC) connection tracking helper");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#ifdef MODULE_PARM
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i");
MODULE_PARM_DESC(ports, "port numbers of IRC servers"); MODULE_PARM_DESC(ports, "port numbers of IRC servers");
MODULE_PARM(max_dcc_channels, "i"); MODULE_PARM(max_dcc_channels, "i");
MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC session"); MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC session");
MODULE_PARM(dcc_timeout, "i"); MODULE_PARM(dcc_timeout, "i");
MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels"); MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels");
#endif
static char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " }; static char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " };
#define MINMATCHLEN 5 #define MINMATCHLEN 5
......
...@@ -27,10 +27,8 @@ MODULE_LICENSE("GPL"); ...@@ -27,10 +27,8 @@ MODULE_LICENSE("GPL");
#define MAX_PORTS 8 #define MAX_PORTS 8
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
static int ports_c; static int ports_c;
#ifdef MODULE_PARM
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i");
MODULE_PARM_DESC(ports, "port numbers of tftp servers"); MODULE_PARM_DESC(ports, "port numbers of tftp servers");
#endif
#if 0 #if 0
#define DEBUGP(format, args...) printk("%s:%s:" format, \ #define DEBUGP(format, args...) printk("%s:%s:" format, \
......
...@@ -33,9 +33,7 @@ MODULE_DESCRIPTION("ftp NAT helper"); ...@@ -33,9 +33,7 @@ MODULE_DESCRIPTION("ftp NAT helper");
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
static int ports_c; static int ports_c;
#ifdef MODULE_PARM
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i");
#endif
DECLARE_LOCK_EXTERN(ip_ftp_lock); DECLARE_LOCK_EXTERN(ip_ftp_lock);
......
...@@ -41,10 +41,8 @@ static int ports_c; ...@@ -41,10 +41,8 @@ static int ports_c;
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>"); MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
MODULE_DESCRIPTION("IRC (DCC) NAT helper"); MODULE_DESCRIPTION("IRC (DCC) NAT helper");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#ifdef MODULE_PARM
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i");
MODULE_PARM_DESC(ports, "port numbers of IRC servers"); MODULE_PARM_DESC(ports, "port numbers of IRC servers");
#endif
/* protects irc part of conntracks */ /* protects irc part of conntracks */
DECLARE_LOCK_EXTERN(ip_irc_lock); DECLARE_LOCK_EXTERN(ip_irc_lock);
......
...@@ -41,10 +41,8 @@ MODULE_LICENSE("GPL"); ...@@ -41,10 +41,8 @@ MODULE_LICENSE("GPL");
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
static int ports_c = 0; static int ports_c = 0;
#ifdef MODULE_PARM
MODULE_PARM(ports,"1-" __MODULE_STRING(MAX_PORTS) "i"); MODULE_PARM(ports,"1-" __MODULE_STRING(MAX_PORTS) "i");
MODULE_PARM_DESC(ports, "port numbers of tftp servers"); MODULE_PARM_DESC(ports, "port numbers of tftp servers");
#endif
#if 0 #if 0
#define DEBUGP(format, args...) printk("%s:%s:" format, \ #define DEBUGP(format, args...) printk("%s:%s:" format, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment