[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170314094347.GN4136@mwanda>
Date: Tue, 14 Mar 2017 12:43:47 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Pushkar Jambhlekar <pushkar.iit@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wolfram Sang <wsa@...-dreams.de>,
sayli karnik <karniksayli1995@...il.com>,
Markus Elfring <elfring@...rs.sourceforge.net>,
Nick Rosbrook <nrosbrook@...l.smcvt.edu>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ks7010: adding parenthesis to macro argument
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@...il.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
Powered by blists - more mailing lists