Skip to contentSkip to conversation

net: trivial MLX4_DEBUG dependency fix.

PATCH Applied Paul Mundt 3 participants 5 messages May 10, 2007 Network drivers

lore
Share & tools
lore

Paul Mundt

author
#0 lore raw

PATCH 1/1 net: trivial MLX4_DEBUG dependency fix.

First SLUB_DEBUG, and now this..

CONFIG_MLX4_DEBUG works out to a def_bool y for those that have CONFIG_EMBEDDED set. Make it depend on MLX4_CORE..

I'll let someone else wonder why debugging output is default enabled, this seems to be a worrying trend as of late.

--

drivers/net/Kconfig +1 -0
index fa489b1..b3f4ffa 100644
@@ -2500,6 +2500,7 @@ config MLX4_CORE
 
 config MLX4_DEBUG
 	bool "Verbose debugging output" if (MLX4_CORE && EMBEDDED)
+	depends on MLX4_CORE
 	default y
 	---help---
 	  This option causes debugging code to be compiled into the
#1 lore raw
Quoted 2 lines

CONFIG_MLX4_DEBUG works out to a def_bool y for those that have CONFIG_EMBEDDED set. Make it depend on MLX4_CORE..

Thanks, applied... (by the way, this bug just results in an extraneous CONFIG variable being defined, right? There's no further breakage -- or am I misunderstanding the situation?)

Quoted 2 lines

I'll let someone else wonder why debugging output is default enabled, this seems to be a worrying trend as of late.

Actually this option just controls whether to build the debugging output at all. The output is controlled at runtime with a module parameter (which can be changed via sysfs after the module is loaded), and the output defaults to off.

The reason why I want building the debugging stuff to default to y is so that distros automatically build modules with debugging enabled. Otherwise it's a pain to try and gather info from someone who has problems with a kernel they didn't build.

Thanks,
Roland

#2 lore raw

Hi,

Quoted 6 lines · Roland Dreier
Quoted 2 lines

CONFIG_MLX4_DEBUG works out to a def_bool y for those that have CONFIG_EMBEDDED set. Make it depend on MLX4_CORE..

Thanks, applied... (by the way, this bug just results in an extraneous CONFIG variable being defined, right? There's no further breakage -- or am I misunderstanding the situation?)

Yeah, it won't cause any build breakage. It doesn't cause anything to even get _built_ actually, because of the way this config option is used directly in the .h and .c sources in drivers/net/mlx4/ (which is itself compiled only when MLX4_CORE=y or m), and not in a Makefile.

Quoted 8 lines
Quoted 2 lines

I'll let someone else wonder why debugging output is default enabled, this seems to be a worrying trend as of late.

Actually this option just controls whether to build the debugging output at all. The output is controlled at runtime with a module parameter (which can be changed via sysfs after the module is loaded), and the output defaults to off.

Quoted 4 lines

The reason why I want building the debugging stuff to default to y is so that distros automatically build modules with debugging enabled. Otherwise it's a pain to try and gather info from someone who has problems with a kernel they didn't build.

IMHO default configs must be aimed at production usage scenarios, so are better off without debugging enabled by default. Except if the driver is really new / EXPERIMENTAL where the goal is to get it tested out by all users asap (and no production systems would be using it anyway).

Just my 2 paise,
Satyam

author
#4 lore raw
In reply to Roland Dreier
Quoted 7 lines · Roland Dreier
Quoted 2 lines

CONFIG_MLX4_DEBUG works out to a def_bool y for those that have CONFIG_EMBEDDED set. Make it depend on MLX4_CORE..

Thanks, applied... (by the way, this bug just results in an extraneous CONFIG variable being defined, right? There's no further breakage -- or am I misunderstanding the situation?)

Correct, there was no real breakage, just the extraneous variable. SLUB_DEBUG had the same symptoms, which is why I referenced it ;-)

Quoted 8 lines
Quoted 2 lines

I'll let someone else wonder why debugging output is default enabled, this seems to be a worrying trend as of late.

Actually this option just controls whether to build the debugging output at all. The output is controlled at runtime with a module parameter (which can be changed via sysfs after the module is loaded), and the output defaults to off.

Quoted 5 lines

The reason why I want building the debugging stuff to default to y is so that distros automatically build modules with debugging enabled. Otherwise it's a pain to try and gather info from someone who has problems with a kernel they didn't build.

That's more reasonable at least. Thanks for the clarification.

#3 lore raw
In reply to Satyam Sharma
Quoted 5 lines

IMHO default configs must be aimed at production usage scenarios, so are better off without debugging enabled by default. Except if the driver is really new / EXPERIMENTAL where the goal is to get it tested out by all users asap (and no production systems would be using it anyway).

I agree, but I would hope that MLX4_DEBUG *is* enabled in production. It doesn't print anything or introduce any measurable overhead except for slightly larger code size unless the debug level is explicitly increased, so the only reason to turn it off is if a few bytes of code makes a big difference to you (hence making it selectable only if EMBEDDED is selected).