Re: [PATCH v2 2/3] staging: rtl8192u: fix macro alignment in ieee80211

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

 



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


_______________________________________________
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