Skip to contentSkip to conversation

net/ibmvnic: Fix typo in retry check

PATCH Applied Thomas Falcon 2 participants 3 messages Dec 11, 2019 – Dec 16, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net/ibmvnic: Fix typo in retry check

This conditional is missing a bang, with the intent being to break when the retry count reaches zero.

Fixes 476d96ca9c ("ibmvnic: Bound waits for device queries")
---
 drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ibm/ibmvnic.c +1 -1
index efb0f10..2d84523 100644
@@ -184,7 +184,7 @@ static int ibmvnic_wait_for_completion(struct ibmvnic_adapter *adapter,
 			netdev_err(netdev, "Device down!\n");
 			return -ENODEV;
 		}
-		if (retry--)
+		if (!retry--)
 			break;
 		if (wait_for_completion_timeout(comp_done, div_timeout))
 			return 0;
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 6 lines · Thomas Falcon

This conditional is missing a bang, with the intent being to break when the retry count reaches zero.

Fixes 476d96ca9c ("ibmvnic: Bound waits for device queries")

Ah damn, looks like this originates from my pseudo code.

I had to fix the fixes tag:

Commit: 847496ccfa22 ("net/ibmvnic: Fix typo in retry check")
Fixes tag: Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Has these problem(s):
- SHA1 should be at least 12 digits long
Can be fixed by setting core.abbrev to 12 (or more) or (for git v2.11 or later) just making sure it is not set (or set to "auto").

Applied to net, thanks!

Quoted 13 lines
drivers/net/ethernet/ibm/ibmvnic.c +1 -1
index efb0f10..2d84523 100644
@@ -184,7 +184,7 @@ static int ibmvnic_wait_for_completion(struct ibmvnic_adapter *adapter,
 			netdev_err(netdev, "Device down!\n");
 			return -ENODEV;
 		}
-		if (retry--)
+		if (!retry--)
 			break;
 		if (wait_for_completion_timeout(comp_done, div_timeout))
 			return 0;
#2 lore raw
Quoted 9 lines · Jakub Kicinski
Quoted 6 lines · Thomas Falcon

This conditional is missing a bang, with the intent being to break when the retry count reaches zero.

Fixes 476d96ca9c ("ibmvnic: Bound waits for device queries")

Ah damn, looks like this originates from my pseudo code.

Quoted 8 lines

I had to fix the fixes tag:

Commit: 847496ccfa22 ("net/ibmvnic: Fix typo in retry check")
Fixes tag: Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Has these problem(s):
- SHA1 should be at least 12 digits long
Can be fixed by setting core.abbrev to 12 (or more) or (for git v2.11 or later) just making sure it is not set (or set to "auto").

Thanks, I'll keep that in mind next time.  IIRC I was making some last minute cosmetic changes before sending, and it might have slipped in that way.  In any case, I should have been more thorough in testing it.

Thanks,

Tom

Quoted 16 lines

Applied to net, thanks!

Quoted 13 lines
drivers/net/ethernet/ibm/ibmvnic.c +1 -1
index efb0f10..2d84523 100644
@@ -184,7 +184,7 @@ static int ibmvnic_wait_for_completion(struct ibmvnic_adapter *adapter,
  			netdev_err(netdev, "Device down!\n");
  			return -ENODEV;
  		}
-		if (retry--)
+		if (!retry--)
  			break;
  		if (wait_for_completion_timeout(comp_done, div_timeout))
  			return 0;