linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] smc: return boolean instead of integer in using_ipsec
@ 2018-01-18 23:33 Gustavo A. R. Silva
  2018-01-19  8:35 ` Ursula Braun
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-18 23:33 UTC (permalink / raw)
  To: Ursula Braun, David S. Miller
  Cc: linux-s390, netdev, linux-kernel, Gustavo A. R. Silva

Return statements in functions returning bool should use
true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 net/smc/smc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/smc/smc.h b/net/smc/smc.h
index 0bee9d1..ef13af4 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -258,7 +258,7 @@ static inline bool using_ipsec(struct smc_sock *smc)
 #else
 static inline bool using_ipsec(struct smc_sock *smc)
 {
-	return 0;
+	return false;
 }
 #endif
 
-- 
2.7.4

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

* Re: [PATCH] smc: return boolean instead of integer in using_ipsec
  2018-01-18 23:33 [PATCH] smc: return boolean instead of integer in using_ipsec Gustavo A. R. Silva
@ 2018-01-19  8:35 ` Ursula Braun
  2018-01-19 20:49   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Ursula Braun @ 2018-01-19  8:35 UTC (permalink / raw)
  To: Gustavo A. R. Silva, David S. Miller; +Cc: linux-s390, netdev, linux-kernel



On 01/19/2018 12:33 AM, Gustavo A. R. Silva wrote:
> Return statements in functions returning bool should use
> true/false instead of 1/0.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  net/smc/smc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/smc/smc.h b/net/smc/smc.h
> index 0bee9d1..ef13af4 100644
> --- a/net/smc/smc.h
> +++ b/net/smc/smc.h
> @@ -258,7 +258,7 @@ static inline bool using_ipsec(struct smc_sock *smc)
>  #else
>  static inline bool using_ipsec(struct smc_sock *smc)
>  {
> -	return 0;
> +	return false;
>  }
>  #endif
> 

Gustavo,
thanks for reporting, but your improvement seems to be incomplete. Besides changing
line 260 of net/smc/smc.h, line 255 should be adapted the same way. Will you
come up with a second patch version here?

Kind regards, Ursula Braun

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

* Re: [PATCH] smc: return boolean instead of integer in using_ipsec
  2018-01-19  8:35 ` Ursula Braun
@ 2018-01-19 20:49   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-19 20:49 UTC (permalink / raw)
  To: Ursula Braun; +Cc: David S. Miller, linux-s390, netdev, linux-kernel

Hi Ursula,

Quoting Ursula Braun <ubraun@linux.vnet.ibm.com>:

> On 01/19/2018 12:33 AM, Gustavo A. R. Silva wrote:
>> Return statements in functions returning bool should use
>> true/false instead of 1/0.
>>
>> This issue was detected with the help of Coccinelle.
>>
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>> ---
>>  net/smc/smc.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/smc/smc.h b/net/smc/smc.h
>> index 0bee9d1..ef13af4 100644
>> --- a/net/smc/smc.h
>> +++ b/net/smc/smc.h
>> @@ -258,7 +258,7 @@ static inline bool using_ipsec(struct smc_sock *smc)
>>  #else
>>  static inline bool using_ipsec(struct smc_sock *smc)
>>  {
>> -	return 0;
>> +	return false;
>>  }
>>  #endif
>>
>
> Gustavo,
> thanks for reporting, but your improvement seems to be incomplete.  
> Besides changing
> line 260 of net/smc/smc.h, line 255 should be adapted the same way. Will you
> come up with a second patch version here?
>

You are correct. I'll send a new patch shortly.

Thanks for the feedback.
--
Gustavo

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

end of thread, other threads:[~2018-01-19 21:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 23:33 [PATCH] smc: return boolean instead of integer in using_ipsec Gustavo A. R. Silva
2018-01-19  8:35 ` Ursula Braun
2018-01-19 20:49   ` Gustavo A. R. Silva

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).