Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary do-while removed from macro

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

 



On Sat, Jan 14, 2017 at 11:53:36PM +0530, Kartikey Singh wrote:
> do while loop removed from single statement macro
> 
> Signed-off-by: Kartikey Singh <dr.kartikeynrc@xxxxxxxxx>
> ---
>  drivers/staging/rtl8188eu/include/wifi.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h
> index 9e08e68..57db709 100644
> --- a/drivers/staging/rtl8188eu/include/wifi.h
> +++ b/drivers/staging/rtl8188eu/include/wifi.h
> @@ -481,9 +481,7 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe)
>  ------------------------------------------------------------------------------*/
>  
>  #define SetOrderBit(pbuf)	\
> -	do	{	\
> -		*(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \
> -	} while (0)
> +	(*(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_))

This macro is never used, so it could just be removed, right?

>  #define GetOrderBit(pbuf)			\
>  	(((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)

Same with that one.  Care to do that type of fixup instead please?

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