mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Staging: ks7010: fix unnecessary parentheses in ks_hostif.c
@ 2018-02-17  9:56 Yash Omer
  2018-02-17 11:53 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Yash Omer @ 2018-02-17  9:56 UTC (permalink / raw)
  To: gregkh; +Cc: devel, florian.c.schilhabel, driverdev-devel, linux-kernel

This patch fixes up unncessary parentheses warning found by checkpatch.pl script

Signed-off-by: Yash Omer<yashomer0007@gmail.com>
---
 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++;
 	/* length check in advance ! */
 	--(priv->rx_size);
 	return data;
-- 
2.14.3

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Staging: ks7010: fix unnecessary parentheses in ks_hostif.c
  2018-02-17  9:56 [PATCH] Staging: ks7010: fix unnecessary parentheses in ks_hostif.c Yash Omer
@ 2018-02-17 11:53 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2018-02-17 11:53 UTC (permalink / raw)
  To: Yash Omer; +Cc: devel, florian.c.schilhabel, driverdev-devel, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-17 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-17  9:56 [PATCH] Staging: ks7010: fix unnecessary parentheses in ks_hostif.c Yash Omer
2018-02-17 11:53 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®