[PATCH v2 1/5] ath10k: fix checkpatch warnings related to spaces

Joe Perches joe at perches.com
Thu Apr 14 00:47:08 PDT 2016


On Wed, 2016-04-13 at 14:13 +0300, Kalle Valo wrote:
> Fix checkpatch warnings about use of spaces with operators:
> spaces preferred around that '*' (ctx:VxV)
> This has been recently added to checkpatch.

Trivia: That's not a particularly recent change.

> diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
[]
> @@ -5342,7 +5342,7 @@ enum wmi_sta_ps_param_pspoll_count {
>  #define WMI_UAPSD_AC_TYPE_TRIG 1
>  
>  #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
> -	((type ==  WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)))
> +	((type ==  WMI_UAPSD_AC_TYPE_DELI) ? (1 << (ac << 1)) : (1 << ((ac << 1) + 1)))

There are a bunch of unnecessary parentheses here.
This could also use the BIT macro:

#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
	(type == WMI_UAPSD_AC_TYPE_DELI ? BIT(ac << 1) : BIT((ac << 1) + 1))




More information about the ath10k mailing list