Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559042

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

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary do-while removed from macro
Date 2017-01-14 19:40 +0100
Message-ID <sZBp8-Qr-15@gated-at.bofh.it> (permalink)
References <sZBfr-Np-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@gmail.com>
> ---
>  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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary  do-while removed from macro Kartikey Singh <dr.kartikeynrc@gmail.com> - 2017-01-14 19:30 +0100
  Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary  do-while removed from macro Greg KH <gregkh@linuxfoundation.org> - 2017-01-14 19:40 +0100
    Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary  do-while removed from macro Kartikey Singh <dr.kartikeynrc@gmail.com> - 2017-01-14 20:40 +0100
      Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary  do-while removed from macro Greg KH <gregkh@linuxfoundation.org> - 2017-01-15 12:00 +0100
    Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary  do-while removed from macro Greg KH <gregkh@linuxfoundation.org> - 2017-01-14 20:50 +0100
      Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary  do-while removed from macro Ivan Safonov <insafonov@gmail.com> - 2017-01-14 21:00 +0100
        Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary  do-while removed from macro Greg KH <gregkh@linuxfoundation.org> - 2017-01-15 12:00 +0100

csiph-web