public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: trivial MLX4_DEBUG dependency fix.
@ 2007-05-10  3:50 Paul Mundt
  2007-05-10 11:42 ` Roland Dreier
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Mundt @ 2007-05-10  3:50 UTC (permalink / raw)
  To: Roland Dreier; +Cc: linux-kernel

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.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

--

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index fa489b1..b3f4ffa 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: trivial MLX4_DEBUG dependency fix.
  2007-05-10  3:50 [PATCH] net: trivial MLX4_DEBUG dependency fix Paul Mundt
@ 2007-05-10 11:42 ` Roland Dreier
  2007-05-10 12:11   ` Satyam Sharma
  2007-05-10 12:49   ` Paul Mundt
  0 siblings, 2 replies; 5+ messages in thread
From: Roland Dreier @ 2007-05-10 11:42 UTC (permalink / raw)
  To: Paul Mundt; +Cc: Roland Dreier, linux-kernel

 > 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?)

 > 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: trivial MLX4_DEBUG dependency fix.
  2007-05-10 11:42 ` Roland Dreier
@ 2007-05-10 12:11   ` Satyam Sharma
  2007-05-10 18:20     ` Roland Dreier
  2007-05-10 12:49   ` Paul Mundt
  1 sibling, 1 reply; 5+ messages in thread
From: Satyam Sharma @ 2007-05-10 12:11 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Paul Mundt, Roland Dreier, linux-kernel

Hi,

On 5/10/07, Roland Dreier <rdreier@cisco.com> wrote:
>  > 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.

>  > 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.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: trivial MLX4_DEBUG dependency fix.
  2007-05-10 11:42 ` Roland Dreier
  2007-05-10 12:11   ` Satyam Sharma
@ 2007-05-10 12:49   ` Paul Mundt
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Mundt @ 2007-05-10 12:49 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Roland Dreier, linux-kernel

On Thu, May 10, 2007 at 04:42:37AM -0700, Roland Dreier wrote:
>  > 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 ;-)

>  > 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.
> 
That's more reasonable at least. Thanks for the clarification.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: trivial MLX4_DEBUG dependency fix.
  2007-05-10 12:11   ` Satyam Sharma
@ 2007-05-10 18:20     ` Roland Dreier
  0 siblings, 0 replies; 5+ messages in thread
From: Roland Dreier @ 2007-05-10 18:20 UTC (permalink / raw)
  To: Satyam Sharma; +Cc: Paul Mundt, Roland Dreier, linux-kernel

 > 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).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-10 18:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-10  3:50 [PATCH] net: trivial MLX4_DEBUG dependency fix Paul Mundt
2007-05-10 11:42 ` Roland Dreier
2007-05-10 12:11   ` Satyam Sharma
2007-05-10 18:20     ` Roland Dreier
2007-05-10 12:49   ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox