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


Groups > linux.kernel > #1600157

Re: [PATCH] ks7010: adding parenthesis to macro argument

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] ks7010: adding parenthesis to macro argument
Date 2017-03-14 10:50 +0100
Message-ID <tkRfA-6BP-5@gated-at.bofh.it> (permalink)
References <tkNvk-3Vo-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Mar 14, 2017 at 11:12:42AM +0530, Pushkar Jambhlekar wrote:
> Description:
> In driver module ks7010, "checkpatch.pl" flags error for adding parenthesis around macro params.
> Also, removing extra line.

Don't do this as one patch.

> 
> Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
> ---
>  drivers/staging/ks7010/ks7010_sdio.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
> index a604c83..644b8d4 100644
> --- a/drivers/staging/ks7010/ks7010_sdio.c
> +++ b/drivers/staging/ks7010/ks7010_sdio.c
> @@ -35,18 +35,18 @@ MODULE_DEVICE_TABLE(sdio, ks7010_sdio_ids);
>  /* macro */
>  
>  #define inc_txqhead(priv) \
> -	(priv->tx_dev.qhead = (priv->tx_dev.qhead + 1) % TX_DEVICE_BUFF_SIZE)
> +	((priv)->tx_dev.qhead = ((priv)->tx_dev.qhead + 1) % TX_DEVICE_BUFF_SIZE)

I can't get excited about this at all.  Make it a function or leave it
alone.

regards,
dan carpenter

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


Thread

[PATCH] ks7010: adding parenthesis to macro argument Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-03-14 06:50 +0100
  Re: [PATCH] ks7010: adding parenthesis to macro argument Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-14 10:50 +0100
    Re: [PATCH] ks7010: adding parenthesis to macro argument Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-03-14 11:10 +0100
      Re: [PATCH] ks7010: adding parenthesis to macro argument Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-14 11:50 +0100

csiph-web