Re: [PATCH v2 2/3] staging: rtl8192u: fix macro alignment in ieee80211
From: Joe Perches
Date: Wed Aug 28 2019 - 13:20:30 EST
On Wed, 2019-08-21 at 07:35 -0700, Stephen Brennan wrote:
> Several macros display unaligned, due to mixes of tabs and spaces. These
> can be fixed by making spacing consistent, do this.
[]
> @@ -452,18 +452,19 @@ do { if (ieee80211_debug_level & (level)) \
> printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0)
> //wb added to debug out data buf
> //if you want print DATA buffer related BA, please set ieee80211_debug_level to DATA|BA
> -#define IEEE80211_DEBUG_DATA(level, data, datalen) \
> - do { if ((ieee80211_debug_level & (level)) == (level)) \
> - { \
> - int i; \
> - u8 *pdata = (u8 *) data; \
> - printk(KERN_DEBUG "ieee80211: %s()\n", __func__); \
> - for (i = 0; i < (int)(datalen); i++) { \
> - printk("%2x ", pdata[i]); \
> - if ((i + 1) % 16 == 0) printk("\n"); \
> - } \
> - printk("\n"); \
> - } \
> +#define IEEE80211_DEBUG_DATA(level, data, datalen) \
> + do { if ((ieee80211_debug_level & (level)) == (level)) \
> + { \
> + int i; \
> + u8 *pdata = (u8 *) data; \
> + printk(KERN_DEBUG "ieee80211: %s()\n", __func__); \
> + for (i = 0; i < (int)(datalen); i++) { \
> + printk("%2x ", pdata[i]); \
> + if ((i + 1) % 16 == 0) \
> + printk("\n"); \
> + } \
> + printk("\n"); \
without pr_cont/KERN_CONT, this will output a terrible mess.
It's probably better to use print_hex_dump_debug