Re: [PATCH 2/3] staging: wlan-ng: reformatting in hfa384x.h to fit 80 character limit

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

 



On Wed, Nov 07, 2018 at 08:09:19PM +0000, Tim Collier wrote:
> Reformat lines over 80 characters in hfa384x.h to resolve "line over
> 80 characters" warnings reported by checkpatch.
> 
> Signed-off-by: Tim Collier <osdevtc@xxxxxxxxx>
> ---
>  drivers/staging/wlan-ng/hfa384x.h | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
> index 992ebaa1071f..4f2177d1e1bc 100644
> --- a/drivers/staging/wlan-ng/hfa384x.h
> +++ b/drivers/staging/wlan-ng/hfa384x.h
> @@ -517,7 +517,8 @@ struct hfa384x_tx_frame {
>  	HFA384x_TXSTATUS_DISCON | HFA384x_TXSTATUS_AGEDERR | \
>  	HFA384x_TXSTATUS_RETRYERR))
>  
> -#define	HFA384x_TX_SET(v, m, s)		((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
> +#define	HFA384x_TX_SET(v, m, s)	\
> +	((((u16)(v)) << ((u16)(s))) & ((u16)(m)))

Ick, can't this look better as:
#define HFA384x_TX_SET(v, m, s)		((((u16)(v)) << ((u16)(s))) & ((u16)(m)))

No need for the tab after "define", and splitting this to a new line
just makes it harder to read.

Odds are this macro can just be replaced with something standard as
well, that looks like a common bit mask/set macro, right?

thanks,

greg k-h
_______________________________________________
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