* [PATCH] ipw2100: wraps the debug module param within #ifdefs
@ 2006-04-13 9:14 Zhu Yi
2006-04-13 17:30 ` Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: Zhu Yi @ 2006-04-13 9:14 UTC (permalink / raw)
To: netdev, John W. Linville
Signed-off-by: Henrik Brix Andersen <brix@gentoo.org>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
drivers/net/wireless/ipw2100.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
e78cfdab91a809722be99c06574d2e0a60467644
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 72335c8..2cd32a4 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -184,7 +184,9 @@ MODULE_VERSION(DRV_VERSION);
MODULE_AUTHOR(DRV_COPYRIGHT);
MODULE_LICENSE("GPL");
+#ifdef CONFIG_IPW2100_DEBUG
static int debug = 0;
+#endif
static int mode = 0;
static int channel = 0;
static int associate = 1;
@@ -194,13 +196,17 @@ static struct ipw2100_fw ipw2100_firmwar
#endif
#include <linux/moduleparam.h>
+#ifdef CONFIG_IPW2100_DEBUG
module_param(debug, int, 0444);
+#endif
module_param(mode, int, 0444);
module_param(channel, int, 0444);
module_param(associate, int, 0444);
module_param(disable, int, 0444);
+#ifdef CONFIG_IPW2100_DEBUG
MODULE_PARM_DESC(debug, "debug level");
+#endif
MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)");
MODULE_PARM_DESC(channel, "channel");
MODULE_PARM_DESC(associate, "auto associate when scanning (default on)");
--
1.2.6
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ipw2100: wraps the debug module param within #ifdefs
2006-04-13 9:14 [PATCH] ipw2100: wraps the debug module param within #ifdefs Zhu Yi
@ 2006-04-13 17:30 ` Stephen Hemminger
2006-04-14 5:18 ` Zhu Yi
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2006-04-13 17:30 UTC (permalink / raw)
To: yi.zhu; +Cc: netdev, John W. Linville
Please get rid of the debug config option. Make the debug code, default
off and be low enough impact that everyone can ship with it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ipw2100: wraps the debug module param within #ifdefs
2006-04-13 17:30 ` Stephen Hemminger
@ 2006-04-14 5:18 ` Zhu Yi
2006-04-14 16:33 ` Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: Zhu Yi @ 2006-04-14 5:18 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, John W. Linville
On Thu, 2006-04-13 at 10:30 -0700, Stephen Hemminger wrote:
> Please get rid of the debug config option. Make the debug code, default
> off and be low enough impact that everyone can ship with it.
This patch is exactly doing so. There won't be the debug module param if
CONFIG_IPW2200_DEBUG is not defined. Otherwise it could be used to set
different debug level, which helps a lot for the driver debuging.
Thanks,
-yi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ipw2100: wraps the debug module param within #ifdefs
2006-04-14 5:18 ` Zhu Yi
@ 2006-04-14 16:33 ` Stephen Hemminger
2006-04-17 2:17 ` Zhu Yi
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2006-04-14 16:33 UTC (permalink / raw)
To: Zhu Yi; +Cc: netdev, John W. Linville
On Fri, 14 Apr 2006 13:18:31 +0800
Zhu Yi <yi.zhu@intel.com> wrote:
> On Thu, 2006-04-13 at 10:30 -0700, Stephen Hemminger wrote:
> > Please get rid of the debug config option. Make the debug code, default
> > off and be low enough impact that everyone can ship with it.
>
> This patch is exactly doing so. There won't be the debug module param if
> CONFIG_IPW2200_DEBUG is not defined. Otherwise it could be used to set
> different debug level, which helps a lot for the driver debuging.
>
I meant get rid of CONFIG_IPW2200_DEBUG completely. Having the debug code isn't
bad, and there is no reason not to have it always there.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ipw2100: wraps the debug module param within #ifdefs
2006-04-14 16:33 ` Stephen Hemminger
@ 2006-04-17 2:17 ` Zhu Yi
2006-04-17 16:24 ` Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: Zhu Yi @ 2006-04-17 2:17 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, John W. Linville
On Fri, 2006-04-14 at 09:33 -0700, Stephen Hemminger wrote:
> I meant get rid of CONFIG_IPW2200_DEBUG completely. Having the debug code isn't
> bad, and there is no reason not to have it always there.
There are lots of IPW_DEBUG_XXX in the driver, even in TX and RX paths.
It cause extra cycles for those who really don't need it.
Thanks,
-yi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ipw2100: wraps the debug module param within #ifdefs
2006-04-17 2:17 ` Zhu Yi
@ 2006-04-17 16:24 ` Stephen Hemminger
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2006-04-17 16:24 UTC (permalink / raw)
To: Zhu Yi; +Cc: netdev, John W. Linville
On Mon, 17 Apr 2006 10:17:43 +0800
Zhu Yi <yi.zhu@intel.com> wrote:
> On Fri, 2006-04-14 at 09:33 -0700, Stephen Hemminger wrote:
> > I meant get rid of CONFIG_IPW2200_DEBUG completely. Having the debug code isn't
> > bad, and there is no reason not to have it always there.
>
> There are lots of IPW_DEBUG_XXX in the driver, even in TX and RX paths.
> It cause extra cycles for those who really don't need it.
>
> Thanks,
> -yi
IMHO. There is never a reason for a driver specific config option for debugging.
Either it the debug option is generally useful for support (ie distro's will want it on),
in which case the debugging should be runtime settable but always available;
or the debug option is so meant for the driver developers in which case it should
be enabled by a source modification (see #define DEBUG and pr_debug).
But, those are opinions only and certainly, you can do what you want with your
driver.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-04-17 16:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-13 9:14 [PATCH] ipw2100: wraps the debug module param within #ifdefs Zhu Yi
2006-04-13 17:30 ` Stephen Hemminger
2006-04-14 5:18 ` Zhu Yi
2006-04-14 16:33 ` Stephen Hemminger
2006-04-17 2:17 ` Zhu Yi
2006-04-17 16:24 ` Stephen Hemminger
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).