Skip to contentSkip to conversation

Staging: octeon: Remove unnecessary parentheses

PATCH In review Meghana Madhyastha 2 participants 2 messages Sep 14, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: octeon: Remove unnecessary parentheses

Removes unnecessary parentheses inside the conditional statement.

Found by checkpath.pl

---
 drivers/staging/octeon/ethernet-spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/octeon/ethernet-spi.c +1 -1
index 063dcd0..8c6bb93 100644
@@ -213,7 +213,7 @@ int cvm_oct_spi_init(struct net_device *dev)
 	}
 	number_spi_ports++;
 
-	if ((priv->port == 0) || (priv->port == 16)) {
+	if (priv->port == 0 || priv->port == 16) {
 		cvm_oct_spi_enable_error_reporting(INTERFACE(priv->port));
 		priv->poll = cvm_oct_spi_poll;
 	}
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · Meghana Madhyastha

Removes unnecessary parentheses inside the conditional statement.

Found by checkpath.pl

---
 drivers/staging/octeon/ethernet-spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/octeon/ethernet-spi.c +0 -0
index 063dcd0..8c6bb93 100644

drivers/staging/octeon/ethernet-spi.c int cvm_oct_spi_init(struct net_device *dev) · line 216

Quoted 5 lines
drivers/staging/octeon/ethernet-spi.c +1 -1
@@ -213,7 +213,7 @@ int cvm_oct_spi_init(struct net_device *dev)
 	}
 	number_spi_ports++;
 
-	if ((priv->port == 0) || (priv->port == 16)) {
+	if (priv->port == 0 || priv->port == 16) {

It looks fine, but did you actually compile the code?

julia

Quoted 13 lines
drivers/staging/octeon/ethernet-spi.c +0 -1
 		cvm_oct_spi_enable_error_reporting(INTERFACE(priv->port));
 		priv->poll = cvm_oct_spi_poll;
 	}
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170914165129.GA19272%40meghana-HP-Pavilion-Notebook.
For more options, visit https://groups.google.com/d/optout.