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

Kalle Valo kvalo at qca.qualcomm.com
Mon May 20 16:03:35 EDT 2013


Kalle Valo <kvalo at qca.qualcomm.com> writes:

> Eugene Krasnikov <k.eugene.e at gmail.com> writes:
>
>>> 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
>
> Why? What prevents us to improve dynamic debug's bad interface?

Just to be clear, for me most important is that it's enough to enable
debug messages just by setting debug_mask. The user should not need to
do anything else, no matter what's the kernel configuration.

For example, when user does:

insmod /sdcard/wcn36xx.ko debug_mask=0x00000554

The driver will print debug messages from these levels:

    WCN36XX_DBG_SMD           = 0x00000004,
    WCN36XX_DBG_RX              = 0x00000010,
    WCN36XX_DBG_TX                = 0x00000040,
    WCN36XX_DBG_HAL                 = 0x00000100,
    WCN36XX_DBG_MAC                   = 0x00000400,

Simple, reliable and future proof. And we can document this easily. 

And secondary it should be possibille to enable debug messages runtime
via sysfs:

echo 0x554 > /sys/module/wcn36xx/parameters/debug_mask

If you want to use dynamic debugging for something it should not
complicate these standard cases.


-- 
Kalle Valo



More information about the wcn36xx mailing list