Skip to contentSkip to conversation

Staging: ks7010: fix unnecessary parentheses in ks_hostif.c

PATCH In review Yash Omer 2 participants 2 messages Feb 17, 2018 Staging

lore
Share & tools
lore

Yash Omer

author
#0 lore raw

PATCH 1/1 Staging: ks7010: fix unnecessary parentheses in ks_hostif.c

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

---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ks7010/ks_hostif.c +1 -1
index 7bd567e233d7..36055652842d 100644
@@ -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;
Signature · 6 lines
2.14.3

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
maintainer
#1 lore raw
Quoted 12 lines · Yash Omer

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

---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ks7010/ks_hostif.c +0 -0
index 7bd567e233d7..36055652842d 100644

drivers/staging/ks7010/ks_hostif.c inline u8 get_BYTE(struct ks_wlan_private *priv) · line 39

Quoted 5 lines
drivers/staging/ks7010/ks_hostif.c +1 -1
@@ -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
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel