* [PATCH] dm9000: control debug level of the driver
@ 2011-08-15 16:38 Vladimir Zapolskiy
2011-08-19 5:09 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Zapolskiy @ 2011-08-15 16:38 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Vladimir Zapolskiy, Ben Dooks
This change allows to get driver specific debug messages output
setting a default value for db->debug_level. As far as the maximum
level of verbosity is too high, it is demoted by default.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Cc: Ben Dooks <ben-linux@fluff.org>
---
drivers/net/Kconfig | 2 +-
drivers/net/dm9000.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 8d0314d..20e7936 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -988,7 +988,7 @@ config DM9000
config DM9000_DEBUGLEVEL
int "DM9000 maximum debug level"
depends on DM9000
- default 4
+ default 0
help
The maximum level of debugging code compiled into the DM9000
driver.
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 8ef31dc..b8509a8 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -138,8 +138,7 @@ typedef struct board_info {
/* debug code */
#define dm9000_dbg(db, lev, msg...) do { \
- if ((lev) < CONFIG_DM9000_DEBUGLEVEL && \
- (lev) < db->debug_level) { \
+ if ((lev) < db->debug_level) { \
dev_dbg(db->dev, msg); \
} \
} while (0)
@@ -1381,6 +1380,7 @@ dm9000_probe(struct platform_device *pdev)
db->dev = &pdev->dev;
db->ndev = ndev;
+ db->debug_level = CONFIG_DM9000_DEBUGLEVEL;
spin_lock_init(&db->lock);
mutex_init(&db->addr_lock);
--
1.7.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dm9000: control debug level of the driver
2011-08-15 16:38 [PATCH] dm9000: control debug level of the driver Vladimir Zapolskiy
@ 2011-08-19 5:09 ` David Miller
2011-08-19 20:26 ` Vladimir Zapolskiy
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2011-08-19 5:09 UTC (permalink / raw)
To: vz; +Cc: netdev, ben-linux
From: Vladimir Zapolskiy <vz@mleia.com>
Date: Mon, 15 Aug 2011 19:38:34 +0300
> This change allows to get driver specific debug messages output
> setting a default value for db->debug_level. As far as the maximum
> level of verbosity is too high, it is demoted by default.
>
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Ben Dooks <ben-linux@fluff.org>
I would much rather see this config option eliminated entirely.
The default can be set by the user at kernel boot or module
load time with command line settings.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dm9000: control debug level of the driver
2011-08-19 5:09 ` David Miller
@ 2011-08-19 20:26 ` Vladimir Zapolskiy
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Zapolskiy @ 2011-08-19 20:26 UTC (permalink / raw)
To: David Miller; +Cc: netdev, ben-linux
On 19.08.2011 08:09, David Miller wrote:
> From: Vladimir Zapolskiy<vz@mleia.com>
> Date: Mon, 15 Aug 2011 19:38:34 +0300
>
>> This change allows to get driver specific debug messages output
>> setting a default value for db->debug_level. As far as the maximum
>> level of verbosity is too high, it is demoted by default.
>>
>> Signed-off-by: Vladimir Zapolskiy<vz@mleia.com>
>> Cc: Ben Dooks<ben-linux@fluff.org>
>
> I would much rather see this config option eliminated entirely.
>
> The default can be set by the user at kernel boot or module
> load time with command line settings.
This definitely should be an improvement, initially I wanted to fix a
particular problem, but let's do it even better.
--
With best wishes,
Vladimir
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-19 20:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-15 16:38 [PATCH] dm9000: control debug level of the driver Vladimir Zapolskiy
2011-08-19 5:09 ` David Miller
2011-08-19 20:26 ` Vladimir Zapolskiy
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).