[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMvNc9BKs+UgFWLx6gsbQsrLiecxYuxXrTPEetPpipVb9zhYCQ@mail.gmail.com>
Date: Tue, 14 Mar 2017 03:01:50 -0700
From: Pushkar Jambhlekar <pushkar.iit@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.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
Hi Dan,
I am trying to fix warnings by "checkpatch.pl". Even though it is not
super exciting, no harm to follow correct way.
On Tue, Mar 14, 2017 at 2:43 AM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
> 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
>
--
Jambhlekar Pushkar Arun
M.Tech IIT Roorkee
Powered by blists - more mailing lists