Re: [PATCH v3] staging: vt6655: Macro with braces issue change to inline function

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

 



On Sun, Feb 05, 2023 at 02:08:02PM +0100, Guru Mehar Rachaputi wrote:
> This patch is to fix checkpatch warning: "Macro argument 'iobase' may be better
> as '(iobase)' to avoid precedence issues"
> 
> ---
> Changes in v3:
> 	- Whitespace error from checkpatch fixed
> 
> Changes in v2:
> 	- Macros with one statement that is to call 'iowrite8' function changed
> 	to inline function as reviewed by gregkh@xxxxxxxxxxxxxxxxxxx.
> 	In relation to this, names of the callers of macro are also modified
> 	to call this function.
> 
> Signed-off-by: Guru Mehar Rachaputi <gurumeharrachaputi@xxxxxxxxx>
> ---
>  drivers/staging/vt6655/card.c    | 3 +--
>  drivers/staging/vt6655/channel.c | 2 +-
>  drivers/staging/vt6655/mac.h     | 4 ++--
>  3 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
> index a6ff496b01b6..d2d122dc16d8 100644
> --- a/drivers/staging/vt6655/card.c
> +++ b/drivers/staging/vt6655/card.c
> @@ -643,8 +643,7 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
>  				   &byRsvTime);
>  	iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_72);
>  	/* Set to Page0 */
> -        vt6655_mac_select_page0(priv->port_offset);
> -
> +	vt6655_mac_select_page0(priv->port_offset);
>  
>  	spin_unlock_irqrestore(&priv->lock, flags);
>  }
> diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
> index e9a44bcebe32..60b445c38424 100644
> --- a/drivers/staging/vt6655/channel.c
> +++ b/drivers/staging/vt6655/channel.c
> @@ -121,7 +121,7 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
>  		iowrite8(priv->byCurPwr, priv->port_offset + MAC_REG_PWRCCK);
>  		RFbSetPower(priv, RATE_6M, priv->byCurrentCh);
>  		iowrite8(priv->byCurPwr, priv->port_offset + MAC_REG_PWROFDM);
> -	        vt6655_mac_select_page0(priv->port_offset);
> +		vt6655_mac_select_page0(priv->port_offset);
>  
>  		spin_unlock_irqrestore(&priv->lock, flags);
>  	}
> diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
> index b9a7ca0fe604..ae3064303691 100644
> --- a/drivers/staging/vt6655/mac.h
> +++ b/drivers/staging/vt6655/mac.h
> @@ -539,12 +539,12 @@
>  
>  static inline void vt6655_mac_select_page0(void __iomem *iobase)
>  {
> -        iowrite8(0, iobase + MAC_REG_PAGE1SEL);
> +	iowrite8(0, iobase + MAC_REG_PAGE1SEL);
>  }
>  
>  static inline void  vt6655_mac_select_page1(void __iomem *iobase)
>  {
> -        iowrite8(1, iobase + MAC_REG_PAGE1SEL);
> +	iowrite8(1, iobase + MAC_REG_PAGE1SEL);
>  }
>  
>  #define MAKEWORD(lb, hb) \
> -- 
> 2.34.1
> 
> 
> -- 
> Thanks & Regards,
> Guru
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did not apply to any known trees that Greg is in control
  of.  Possibly this is because you made it against Linus's tree, not
  the linux-next tree, which is where all of the development for the
  next version of the kernel is at.  Please refresh your patch against
  the linux-next tree, or even better yet, the development tree
  specified in the MAINTAINERS file for the subsystem you are submitting
  a patch for, and resend it.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot




[Index of Archives]     [Linux Driver Development]     [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