[v4,1/5] rtl2832 ver. 0.4: removed signal statistics

Message ID 4FB62695.3030909@gmail.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

poma May 18, 2012, 10:38 a.m. UTC
  […]

printk(KERN_ERR LOG_PREFIX": " f "\n" , ## arg)
pr_err(LOG_PREFIX": " f "\n" , ## arg)

printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
pr_info(LOG_PREFIX": " f "\n" , ## arg)

printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
pr_warn(LOG_PREFIX": " f "\n" , ## arg)

Besides what 'checkpatch' suggest/output - Antti, is it a correct
conversions?

cheers,
poma
  

Comments

Antti Palosaari May 18, 2012, 12:38 p.m. UTC | #1
On 18.05.2012 13:38, poma wrote:
> […]
>
> printk(KERN_ERR LOG_PREFIX": " f "\n" , ## arg)
> pr_err(LOG_PREFIX": " f "\n" , ## arg)
>
> printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
> pr_info(LOG_PREFIX": " f "\n" , ## arg)
>
> printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
> pr_warn(LOG_PREFIX": " f "\n" , ## arg)
>
> Besides what 'checkpatch' suggest/output - Antti, is it a correct
> conversions?


I haven't looked those pr_err/pr_info/pr_warn, but what I did for 
af9035/af9033 was I used pr_debug as a debug writings since it seems to 
be choice of today.

I still suspect those pr_* functions should be used instead own macros. 
Currently documentation mentions only pr_debug and pr_info.

regards
Antit
  
poma May 18, 2012, 1:26 p.m. UTC | #2
On 05/18/2012 02:38 PM, Antti Palosaari wrote:
> On 18.05.2012 13:38, poma wrote:
>> […]
>>
>> printk(KERN_ERR LOG_PREFIX": " f "\n" , ## arg)
>> pr_err(LOG_PREFIX": " f "\n" , ## arg)
>>
>> printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
>> pr_info(LOG_PREFIX": " f "\n" , ## arg)
>>
>> printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
>> pr_warn(LOG_PREFIX": " f "\n" , ## arg)
>>
>> Besides what 'checkpatch' suggest/output - Antti, is it a correct
>> conversions?
> 
> 
> I haven't looked those pr_err/pr_info/pr_warn, but what I did for
> af9035/af9033 was I used pr_debug as a debug writings since it seems to
> be choice of today.
> 
> I still suspect those pr_* functions should be used instead own macros.
> Currently documentation mentions only pr_debug and pr_info.
> 
> regards
> Antit

OK, thanks Antti!
Thomas, dropping 'rtl2832_priv.h.diff' & 'rtl2832_priv.h-v2.diff'
Please leave 'rtl2832_priv.h' as it is.
And there you go…

cheers,
poma
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Thomas Mair May 18, 2012, 5:46 p.m. UTC | #3
On 18.05.2012 15:26, poma wrote:
> On 05/18/2012 02:38 PM, Antti Palosaari wrote:
>> On 18.05.2012 13:38, poma wrote:
>>> […]
>>>
>>> printk(KERN_ERR LOG_PREFIX": " f "\n" , ## arg)
>>> pr_err(LOG_PREFIX": " f "\n" , ## arg)
>>>
>>> printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
>>> pr_info(LOG_PREFIX": " f "\n" , ## arg)
>>>
>>> printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
>>> pr_warn(LOG_PREFIX": " f "\n" , ## arg)
>>>
>>> Besides what 'checkpatch' suggest/output - Antti, is it a correct
>>> conversions?
>>
>>
>> I haven't looked those pr_err/pr_info/pr_warn, but what I did for
>> af9035/af9033 was I used pr_debug as a debug writings since it seems to
>> be choice of today.
>>
>> I still suspect those pr_* functions should be used instead own macros.
>> Currently documentation mentions only pr_debug and pr_info.
>>
>> regards
>> Antit
> 
> OK, thanks Antti!
> Thomas, dropping 'rtl2832_priv.h.diff' & 'rtl2832_priv.h-v2.diff'
> Please leave 'rtl2832_priv.h' as it is.
> And there you go…
> 
> cheers,
> poma

Alright. One last question though.

I seem incapable of removing the checkpatch error with the parentheses.
How should that be done properly? Should do something like do { ... } while(0)
or is there a more elegant solution?

Regrads
Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Antti Palosaari May 18, 2012, 5:51 p.m. UTC | #4
On 18.05.2012 20:46, Thomas Mair wrote:
> On 18.05.2012 15:26, poma wrote:
>> On 05/18/2012 02:38 PM, Antti Palosaari wrote:
>>> On 18.05.2012 13:38, poma wrote:
>>>> […]
>>>>
>>>> printk(KERN_ERR LOG_PREFIX": " f "\n" , ## arg)
>>>> pr_err(LOG_PREFIX": " f "\n" , ## arg)
>>>>
>>>> printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
>>>> pr_info(LOG_PREFIX": " f "\n" , ## arg)
>>>>
>>>> printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
>>>> pr_warn(LOG_PREFIX": " f "\n" , ## arg)
>>>>
>>>> Besides what 'checkpatch' suggest/output - Antti, is it a correct
>>>> conversions?
>>>
>>>
>>> I haven't looked those pr_err/pr_info/pr_warn, but what I did for
>>> af9035/af9033 was I used pr_debug as a debug writings since it seems to
>>> be choice of today.
>>>
>>> I still suspect those pr_* functions should be used instead own macros.
>>> Currently documentation mentions only pr_debug and pr_info.
>>>
>>> regards
>>> Antit
>>
>> OK, thanks Antti!
>> Thomas, dropping 'rtl2832_priv.h.diff'&  'rtl2832_priv.h-v2.diff'
>> Please leave 'rtl2832_priv.h' as it is.
>> And there you go…
>>
>> cheers,
>> poma
>
> Alright. One last question though.
>
> I seem incapable of removing the checkpatch error with the parentheses.
> How should that be done properly? Should do something like do { ... } while(0)
> or is there a more elegant solution?

I have seen that do { ... } while(0) many times in Kernel sources so it 
is likely the proper solution.

regards
Antti
  

Patch

--- rtl2832_priv.h.orig	2012-05-18 02:02:48.561114101 +0200
+++ rtl2832_priv.h	2012-05-18 12:20:45.000000000 +0200
@@ -29,13 +29,13 @@ 
 #undef dbg
 #define dbg(f, arg...) \
 	if (rtl2832_debug) \
-		printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
+		pr_info(LOG_PREFIX": " f "\n" , ## arg)
 #undef err
-#define err(f, arg...)  printk(KERN_ERR	LOG_PREFIX": " f "\n" , ## arg)
+#define err(f, arg...) pr_err(LOG_PREFIX": " f "\n" , ## arg)
 #undef info
-#define info(f, arg...) printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
+#define info(f, arg...) pr_info(LOG_PREFIX": " f "\n" , ## arg)
 #undef warn
-#define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
+#define warn(f, arg...) pr_warn(LOG_PREFIX": " f "\n" , ## arg)
 
 struct rtl2832_priv {
 	struct i2c_adapter *i2c;