Re: [PATCH] staging: rtl8192e: rtllib_wx: code style improvements
From: Mateusz Kulikowski
Date: Wed Mar 11 2015 - 03:32:53 EST
On 11.03.2015 00:01, Joe Perches wrote:
> On Tue, 2015-03-10 at 23:53 +0100, Mateusz Kulikowski wrote:
>> - Replaced printk() with netdev_*()
>
> trivia:
>
>> diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
> []
>> @@ -423,11 +421,8 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
>> NULL, (*crypt)->priv);
>> if (len == 0) {
>> /* Set a default key of all 0 */
>> - printk(KERN_INFO "Setting key %d to all zero.\n",
>> - key);
>> -
>> - RTLLIB_DEBUG_WX("Setting key %d to all zero.\n",
>> - key);
>> + netdev_info(dev, "Setting key %d to all zero.\n", key);
>> + RTLLIB_DEBUG_WX("Setting key %d to all zero.\n", key);
>
> This isn't something you've created but it
> seems more than a bit nonsensical to emit the
> same message at different logging levels.
Thanks for hint - I'll throw away duplicate messages for v2.
As for all standalone RTLLIB_DEBUG* entries (in whole driver) -
I think it may be better to replace them with netdev_dbg, and use dynamic debug when needed.
M.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/