Re: [PATCH v2 13/21] staging: rtl8192e: Fix PREFER_PR_LEVEL warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14.04.2015 10:07, Dan Carpenter wrote:
> On Mon, Apr 13, 2015 at 11:47:36PM +0200, Mateusz Kulikowski wrote:
>> Fix most of remaining PREFER_PR_LEVEL warnings in rtllib.
>> Replace printk() with pr_* where possible.
(...)
>>  #define RTLLIB_DEBUG_DATA(level, data, datalen)	\
>>  	do {							\
>>  		if ((rtllib_debug_level & (level)) == (level)) {	\
>> -			printk(KERN_DEBUG "rtllib: %s()\n", __func__);	\
>> +			pr_debug("rtllib: %s()\n", __func__);	\
>>  			print_hex_dump_bytes(KERN_DEBUG, DUMP_PREFIX_NONE, \
>>  					     data, datalen); \
>>  		}					\
> 
> We've made it slightly more tricky to turn on these debug statements.
> 
> I don't think that's a big problem.  I don't think anyone cares about
> them.  They are just noise is my guess.

I agree that lot of the debug messages in that driver are garbage;
Proposal for v3:
- throw away all garbage messages (like "==========>__func__\n"),
- use proper print functions (and loglevels) for remaining RTLLIB_ debug messages (possibly reword them)
- throw away RTLLIB_DEBUG and RTLLIB_DEBUG_DATA macros (i.e. whole RTL 'logging' mechanism)

Most of the messages will stay on DEBUG loglevel, so will not bother "normal" users.

Does it sound good?

Regards,
Mateusz
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux