netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] net/ibmvnic: Fix typo in retry check
@ 2019-12-11 15:38 Thomas Falcon
  2019-12-14  1:27 ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Falcon @ 2019-12-11 15:38 UTC (permalink / raw)
  To: netdev; +Cc: linuxppc-dev, julietk, 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")
Suggested-by: Juliet Kim <julietk@linux.vnet.ibm.com>
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index efb0f10..2d84523 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -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;
-- 
1.8.3.1


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

* Re: [PATCH net v2] net/ibmvnic: Fix typo in retry check
  2019-12-11 15:38 [PATCH net v2] net/ibmvnic: Fix typo in retry check Thomas Falcon
@ 2019-12-14  1:27 ` Jakub Kicinski
  2019-12-16 15:57   ` Thomas Falcon
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2019-12-14  1:27 UTC (permalink / raw)
  To: Thomas Falcon; +Cc: netdev, linuxppc-dev, julietk

On Wed, 11 Dec 2019 09:38:39 -0600, Thomas Falcon wrote:
> 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")
> Suggested-by: Juliet Kim <julietk@linux.vnet.ibm.com>
> Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>

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!

> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
> index efb0f10..2d84523 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -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;


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

* Re: [PATCH net v2] net/ibmvnic: Fix typo in retry check
  2019-12-14  1:27 ` Jakub Kicinski
@ 2019-12-16 15:57   ` Thomas Falcon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Falcon @ 2019-12-16 15:57 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: netdev, linuxppc-dev, julietk


On 12/13/19 7:27 PM, Jakub Kicinski wrote:
> On Wed, 11 Dec 2019 09:38:39 -0600, Thomas Falcon wrote:
>> 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")
>> Suggested-by: Juliet Kim <julietk@linux.vnet.ibm.com>
>> Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
> 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").

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



>
> Applied to net, thanks!
>
>> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
>> index efb0f10..2d84523 100644
>> --- a/drivers/net/ethernet/ibm/ibmvnic.c
>> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
>> @@ -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;

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

end of thread, other threads:[~2019-12-16 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 15:38 [PATCH net v2] net/ibmvnic: Fix typo in retry check Thomas Falcon
2019-12-14  1:27 ` Jakub Kicinski
2019-12-16 15:57   ` Thomas Falcon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).