Re: [PATCH] staging: ks7010: Fix unnecessary parentheses checks.

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

 



On Mon, Jun 26, 2017 at 01:02:27PM -0600, Jonathan Whitaker wrote:
> This patch fixes "Unnecessary parentheses" checks reported by
> the checkpatch.pl script.
> 
> Signed-off-by: Jonathan Bennion Whitaker <jon.b.whitaker@xxxxxxxxx>
> ---
>  drivers/staging/ks7010/ks_hostif.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_
> hostif.c
> index db01a48..3bb812a 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -36,7 +36,7 @@ inline u8 get_BYTE(struct ks_wlan_private *priv)
>  {
>         u8 data;
> 
> -       data = *(priv->rxp)++;
> +       data = *priv->rxp++;

Ick, no, can you now tell me, at a glance, what this line does
correctly?  I can't, without having to go look up the
order-of-operations rules for C and pointers and the like.  Leave this
as-is please, checkpatch.pl is a hint, not a hard rule for foolish
code like this.

thanks,

greg k-h
_______________________________________________
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