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

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

 



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@xxxxxxxxxx> 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@xxxxxxxxx>
>> ---
>>  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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



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