[PATCH 3/7] debug: use printk() instead pr_debug()

Eugene Krasnikov k.eugene.e at gmail.com
Mon May 20 11:24:30 EDT 2013


> But if you want to keep it, I'm not going to loose my sleep on it :)
> Let's try to find a compromise.

I agree completely that this is not something crucial so let’s just
find a compromise:)

> So if CONFIG_DYNAMIC_DEBUG is enabled user/developer needs to use both
> debug_mask and dynamic debug interface to enable the messages, right?

This is how it should work in case of CONFIG_DYNAMIC_DEBUG

Dynamic debug is enabled by default. So all pr_debug == printk. So it
is enough for user to enable only debug_mask. But in case user wants
to disable some particular print he can do it using dynamic debug.

The same thing in case CONFIG_DYNAMIC_DEBUG is not define pr_debug
will be automatically substituted with printk. So we have only
benefits from using dynamic debug:)


> With a compile time check it would that the kernel needs to recompiled
> if a user wants to use only debug_mask. How is this aproach better than
> what I suggested? My suggestion had an extra jump, but the overhead from
> that is minimal.

This approach is better because it’s more flexible in case you want to
disable some specific prints, but at the same time it does not require
any additional actions from user because pr_debug is enabled by
default and is the same as printk.

--
Best regards,
Eugene



More information about the wcn36xx mailing list