Skip to contentSkip to conversation

ibmvnic: add missing parenthesis in do_reset()

PATCH In review Jakub Kicinski 2 participants 3 messages Sep 5, 2020 – Sep 9, 2020

Subsystems (4)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 ibmvnic: add missing parenthesis in do_reset()

Indentation and logic clearly show that this code is missing parenthesis.

Fixes 9f1345737790 ("ibmvnic fix NULL tx_pools and rx_tools issue at do_reset")

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

I randomly noticed this when doing a net -> net-next merge.

Folks, please: (a) make more of an effort testing your code, especially for fixes!, and (b) try making your code COMPILE_TEST-able, I'm 100% sure buildbot would've caught this immediately if it wasn't for the arch dependency.

 drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/ibm/ibmvnic.c +4 -2
index d3a774331afc..1b702a43a5d0 100644
@@ -2032,16 +2032,18 @@ static int do_reset(struct ibmvnic_adapter *adapter,
 
 		} else {
 			rc = reset_tx_pools(adapter);
-			if (rc)
+			if (rc) {
 				netdev_dbg(adapter->netdev, "reset tx pools failed (%d)\n",
 						rc);
 				goto out;
+			}
 
 			rc = reset_rx_pools(adapter);
-			if (rc)
+			if (rc) {
 				netdev_dbg(adapter->netdev, "reset rx pools failed (%d)\n",
 						rc);
 				goto out;
+			}
 		}
 		ibmvnic_disable_irqs(adapter);
 	}
Signature · 1 line
2.26.2
author maintainer
#1 lore raw
Quoted 5 lines · On Fri, 4 Sep 2020 21:07:49 -0700 Jakub Kicinski wrote:

Indentation and logic clearly show that this code is missing parenthesis.

Fixes 9f1345737790 ("ibmvnic fix NULL tx_pools and rx_tools issue at do_reset")

Applied now.

#2 lore raw
Quoted 7 lines · Jakub Kicinski
Quoted 5 lines · On Fri, 4 Sep 2020 21:07:49 -0700 Jakub Kicinski wrote:

Indentation and logic clearly show that this code is missing parenthesis.

Fixes 9f1345737790 ("ibmvnic fix NULL tx_pools and rx_tools issue at do_reset")

Applied now.

Thanks for noticing that!