[PATCH v2 13/16] wcn36xx: add wcn36xx.h

Eugene Krasnikov k.eugene.e at gmail.com
Mon Aug 26 03:23:23 EDT 2013


Since wcn36xx soon will become a part of ath family and all ath
drivers are using printk i thought it's reasonable to use common
approach everywhere:) May be in future all ath debug functions will be
united into one debug framework and the same code will be used
everywhere.

2013/8/24 Joe Perches <joe at perches.com>:
> On Fri, 2013-08-23 at 10:58 +0200, Eugene Krasnikov wrote:
>> Adding wcn36xx.h
> []
>> +#define wcn36xx_err(fmt, arg...)                             \
>> +     printk(KERN_ERR pr_fmt("ERROR " fmt), ##arg);
>> +
>> +#define wcn36xx_warn(fmt, arg...)                            \
>> +     printk(KERN_WARNING pr_fmt("WARNING " fmt), ##arg)
>> +
>> +#define wcn36xx_info(fmt, arg...)            \
>> +     printk(KERN_INFO pr_fmt(fmt), ##arg)
>> +
>
> I these would be better using:
>
> #define wcn36xx_err(fmt, ...)                                   \
>         pr_err("ERROR " fmt, ##__VA_ARGS__)
>
> etc...
>
>> +#define wcn36xx_dbg(mask, fmt, arg...) do {                  \
>> +     if (debug_mask & mask)                                  \
>> +             printk(KERN_DEBUG pr_fmt(fmt), ##arg);  \
>> +} while (0)
>
> And maybe this one using pr_debug so dynamic_debug
> can work too.
>
>



-- 
Best regards,
Eugene



More information about the wcn36xx mailing list