Re: [PATCH] Staging: ks7010: fix unnecessary parentheses in ks_hostif.c

From: Greg KH
Date: Sat Feb 17 2018 - 07:28:51 EST


On Sat, Feb 17, 2018 at 03:26:45PM +0530, Yash Omer wrote:
> This patch fixes up unncessary parentheses warning found by checkpatch.pl script
>
> Signed-off-by: Yash Omer<yashomer0007@xxxxxxxxx>
> ---
> drivers/staging/ks7010/ks_hostif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index 7bd567e233d7..36055652842d 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++;

Oh that's a mess, please just leave the original () there, otherwise you
have to really remember what order comes first here. The () gives the
reader a huge hint as to what is being incremented.

thanks,

greg k-h