* [KJ] [PATCH] convert arlan wireless driver to module_param
@ 2004-11-09 21:32 Stefan Sperling
2004-11-09 21:41 ` Randy.Dunlap
2004-11-09 22:07 ` Stefan Sperling
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Sperling @ 2004-11-09 21:32 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 3591 bytes --]
Replaces MODULE_PARM with module_param calls in arlan wireless driver.
I also reordered module parameter declarations a little to improve readability.
All debug related parameter stuff is now declared in one block, rather than all over the place.
Some debug related module parameters even used to be declared outside DEBUG #ifdefs.
Generally, the arlan debug code is still broken, though. It currently does not compile,
and this patch does not make it compile.
--- drivers/net/wireless/arlan-main.c.orig 2004-11-09 20:40:21.928933608 +0100
+++ drivers/net/wireless/arlan-main.c 2004-11-08 22:28:43.000000000 +0100
@@ -31,52 +31,46 @@ static int retries = 5;
static int tx_queue_len = 1;
static int arlan_EEPROM_bad;
-#ifdef ARLAN_DEBUGGING
+module_param(arlan_debug, bool, 0644);
+module_param(spreadingCode, int, 0644);
+module_param(channelNumber, int, 0644);
+module_param(channelSet, int, 0644);
+module_param(systemId, int, 0644);
+module_param(registrationMode, int, 0644);
+module_param(radioNodeId, int, 0644);
+module_param(SID, int, 0644);
+module_param(keyStart, int, 0644);
+module_param(tx_delay_ms, int, 0644);
+module_param(retries, int, 0644);
+module_param(tx_queue_len, int, 0644);
+module_param(arlan_EEPROM_bad, bool, 0644);
+MODULE_PARM_DESC(arlan_debug, "Arlan debug enable (0-1)");
+MODULE_PARM_DESC(retries, "Arlan maximum packet retransmisions");
-static int arlan_entry_debug;
-static int arlan_exit_debug;
+#ifdef ARLAN_DEBUGGING
static int testMemory = testMemoryUNKNOWN;
static int irq = irqUNKNOWN;
static int txScrambled = 1;
static int mdebug;
-#endif
-
-MODULE_PARM(irq, "i");
-MODULE_PARM(mem, "i");
-MODULE_PARM(arlan_debug, "i");
-MODULE_PARM(testMemory, "i");
-MODULE_PARM(spreadingCode, "i");
-MODULE_PARM(channelNumber, "i");
-MODULE_PARM(channelSet, "i");
-MODULE_PARM(systemId, "i");
-MODULE_PARM(registrationMode, "i");
-MODULE_PARM(radioNodeId, "i");
-MODULE_PARM(SID, "i");
-MODULE_PARM(txScrambled, "i");
-MODULE_PARM(keyStart, "i");
-MODULE_PARM(mdebug, "i");
-MODULE_PARM(tx_delay_ms, "i");
-MODULE_PARM(retries, "i");
-MODULE_PARM(async, "i");
-MODULE_PARM(tx_queue_len, "i");
-MODULE_PARM(arlan_entry_debug, "i");
-MODULE_PARM(arlan_exit_debug, "i");
-MODULE_PARM(arlan_entry_and_exit_debug, "i");
-MODULE_PARM(arlan_EEPROM_bad, "i");
-MODULE_PARM_DESC(irq, "(unused)");
-MODULE_PARM_DESC(mem, "Arlan memory address for single device probing");
-MODULE_PARM_DESC(arlan_debug, "Arlan debug enable (0-1)");
+module_param(testMemory, bool, 0644);
MODULE_PARM_DESC(testMemory, "(unused)");
+module_param(irq, int, 0444);
+MODULE_PARM_DESC(irq, "(unused)");
+module_param(txScrambled, bool, 0644);
+module_param(mdebug, bool, 0644);
MODULE_PARM_DESC(mdebug, "Arlan multicast debugging (0-1)");
-MODULE_PARM_DESC(retries, "Arlan maximum packet retransmisions");
+#endif
+
#ifdef ARLAN_ENTRY_EXIT_DEBUGGING
+static int arlan_entry_debug;
+static int arlan_exit_debug;
+static int arlan_entry_and_exit_debug;
+module_param(arlan_entry_debug, bool, 0644);
+module_param(arlan_exit_debug, bool, 0644);
+module_param(arlan_entry_and_exit_debug, bool, 0644);
MODULE_PARM_DESC(arlan_entry_debug, "Arlan driver function entry debugging");
MODULE_PARM_DESC(arlan_exit_debug, "Arlan driver function exit debugging");
MODULE_PARM_DESC(arlan_entry_and_exit_debug, "Arlan driver function entry and exit debugging");
-#else
-MODULE_PARM_DESC(arlan_entry_debug, "(ignored)");
-MODULE_PARM_DESC(arlan_exit_debug, "(ignored)");
-MODULE_PARM_DESC(arlan_entry_and_exit_debug, "(ignored)");
#endif
struct arlan_conf_stru arlan_conf[MAX_ARLANS];
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [PATCH] convert arlan wireless driver to module_param
2004-11-09 21:32 [KJ] [PATCH] convert arlan wireless driver to module_param Stefan Sperling
@ 2004-11-09 21:41 ` Randy.Dunlap
2004-11-09 22:07 ` Stefan Sperling
1 sibling, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2004-11-09 21:41 UTC (permalink / raw)
To: kernel-janitors
Stefan Sperling wrote:
> Replaces MODULE_PARM with module_param calls in arlan wireless driver.
>
> I also reordered module parameter declarations a little to improve readability.
> All debug related parameter stuff is now declared in one block, rather than all over the place.
> Some debug related module parameters even used to be declared outside DEBUG #ifdefs.
> Generally, the arlan debug code is still broken, though. It currently does not compile,
> and this patch does not make it compile.
Did you at least make sure that (e.g.)
int debug;
is in the source file *before*
module_param(debug, bool, 0644);
This wasn't required for MODULE_PARM() -- i.e., it's different
for module_param().
> --- drivers/net/wireless/arlan-main.c.orig 2004-11-09 20:40:21.928933608 +0100
> +++ drivers/net/wireless/arlan-main.c 2004-11-08 22:28:43.000000000 +0100
> @@ -31,52 +31,46 @@ static int retries = 5;
> static int tx_queue_len = 1;
> static int arlan_EEPROM_bad;
>
> -#ifdef ARLAN_DEBUGGING
> +module_param(arlan_debug, bool, 0644);
> +module_param(spreadingCode, int, 0644);
> +module_param(channelNumber, int, 0644);
> +module_param(channelSet, int, 0644);
> +module_param(systemId, int, 0644);
> +module_param(registrationMode, int, 0644);
> +module_param(radioNodeId, int, 0644);
> +module_param(SID, int, 0644);
> +module_param(keyStart, int, 0644);
> +module_param(tx_delay_ms, int, 0644);
> +module_param(retries, int, 0644);
> +module_param(tx_queue_len, int, 0644);
> +module_param(arlan_EEPROM_bad, bool, 0644);
> +MODULE_PARM_DESC(arlan_debug, "Arlan debug enable (0-1)");
> +MODULE_PARM_DESC(retries, "Arlan maximum packet retransmisions");
>
> -static int arlan_entry_debug;
> -static int arlan_exit_debug;
> +#ifdef ARLAN_DEBUGGING
> static int testMemory = testMemoryUNKNOWN;
> static int irq = irqUNKNOWN;
> static int txScrambled = 1;
> static int mdebug;
> -#endif
> -
> -MODULE_PARM(irq, "i");
> -MODULE_PARM(mem, "i");
> -MODULE_PARM(arlan_debug, "i");
> -MODULE_PARM(testMemory, "i");
> -MODULE_PARM(spreadingCode, "i");
> -MODULE_PARM(channelNumber, "i");
> -MODULE_PARM(channelSet, "i");
> -MODULE_PARM(systemId, "i");
> -MODULE_PARM(registrationMode, "i");
> -MODULE_PARM(radioNodeId, "i");
> -MODULE_PARM(SID, "i");
> -MODULE_PARM(txScrambled, "i");
> -MODULE_PARM(keyStart, "i");
> -MODULE_PARM(mdebug, "i");
> -MODULE_PARM(tx_delay_ms, "i");
> -MODULE_PARM(retries, "i");
> -MODULE_PARM(async, "i");
> -MODULE_PARM(tx_queue_len, "i");
> -MODULE_PARM(arlan_entry_debug, "i");
> -MODULE_PARM(arlan_exit_debug, "i");
> -MODULE_PARM(arlan_entry_and_exit_debug, "i");
> -MODULE_PARM(arlan_EEPROM_bad, "i");
> -MODULE_PARM_DESC(irq, "(unused)");
> -MODULE_PARM_DESC(mem, "Arlan memory address for single device probing");
> -MODULE_PARM_DESC(arlan_debug, "Arlan debug enable (0-1)");
> +module_param(testMemory, bool, 0644);
> MODULE_PARM_DESC(testMemory, "(unused)");
> +module_param(irq, int, 0444);
> +MODULE_PARM_DESC(irq, "(unused)");
> +module_param(txScrambled, bool, 0644);
> +module_param(mdebug, bool, 0644);
> MODULE_PARM_DESC(mdebug, "Arlan multicast debugging (0-1)");
> -MODULE_PARM_DESC(retries, "Arlan maximum packet retransmisions");
> +#endif
> +
> #ifdef ARLAN_ENTRY_EXIT_DEBUGGING
> +static int arlan_entry_debug;
> +static int arlan_exit_debug;
> +static int arlan_entry_and_exit_debug;
> +module_param(arlan_entry_debug, bool, 0644);
> +module_param(arlan_exit_debug, bool, 0644);
> +module_param(arlan_entry_and_exit_debug, bool, 0644);
> MODULE_PARM_DESC(arlan_entry_debug, "Arlan driver function entry debugging");
> MODULE_PARM_DESC(arlan_exit_debug, "Arlan driver function exit debugging");
> MODULE_PARM_DESC(arlan_entry_and_exit_debug, "Arlan driver function entry and exit debugging");
> -#else
> -MODULE_PARM_DESC(arlan_entry_debug, "(ignored)");
> -MODULE_PARM_DESC(arlan_exit_debug, "(ignored)");
> -MODULE_PARM_DESC(arlan_entry_and_exit_debug, "(ignored)");
> #endif
>
> struct arlan_conf_stru arlan_conf[MAX_ARLANS];
--
~Randy
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [PATCH] convert arlan wireless driver to module_param
2004-11-09 21:32 [KJ] [PATCH] convert arlan wireless driver to module_param Stefan Sperling
2004-11-09 21:41 ` Randy.Dunlap
@ 2004-11-09 22:07 ` Stefan Sperling
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Sperling @ 2004-11-09 22:07 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]
On Tue, Nov 09, 2004 at 01:41:14PM -0800, Randy.Dunlap wrote:
> Did you at least make sure that (e.g.)
>
> int debug;
>
> is in the source file *before*
>
> module_param(debug, bool, 0644);
>
> This wasn't required for MODULE_PARM() -- i.e., it's different
> for module_param().
Yes, I did. I always put variable declarations first, and parameter
declarations shortly after.
stefan
--
Give me a fish and I will eat today.
Teach me to fish and I will eat forever.
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-09 22:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-09 21:32 [KJ] [PATCH] convert arlan wireless driver to module_param Stefan Sperling
2004-11-09 21:41 ` Randy.Dunlap
2004-11-09 22:07 ` Stefan Sperling
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.