From: Ursula Braun <ubraun@linux.vnet.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
linux-rdma@vger.kernel.org, jwi@linux.vnet.ibm.com,
schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
raspl@linux.vnet.ibm.com, ubraun@linux.vnet.ibm.com
Subject: [PATCH net-next 5/5] net/smc: return booleans instead of integers
Date: Fri, 26 Jan 2018 09:28:50 +0100 [thread overview]
Message-ID: <20180126082850.20655-6-ubraun@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180126082850.20655-1-ubraun@linux.vnet.ibm.com>
From: Gustavo A. R. Silva <gustavo@embeddedor.com>
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 <gustavo@embeddedor.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
---
net/smc/smc.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/smc/smc.h b/net/smc/smc.h
index bfbe20234105..9518986c97b1 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -252,12 +252,12 @@ static inline int smc_uncompress_bufsize(u8 compressed)
static inline bool using_ipsec(struct smc_sock *smc)
{
return (smc->clcsock->sk->sk_policy[0] ||
- smc->clcsock->sk->sk_policy[1]) ? 1 : 0;
+ smc->clcsock->sk->sk_policy[1]) ? true : false;
}
#else
static inline bool using_ipsec(struct smc_sock *smc)
{
- return 0;
+ return false;
}
#endif
--
2.13.5
next prev parent reply other threads:[~2018-01-26 8:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 8:28 [PATCH net-next 0/5] net/smc: fixes 2018-01-26 Ursula Braun
2018-01-26 8:28 ` [PATCH net-next 1/5] net/smc: handle device, port, and QP error events Ursula Braun
2018-01-26 8:28 ` [PATCH net-next 2/5] net/smc: smc_poll improvements Ursula Braun
[not found] ` <20180126082850.20655-1-ubraun-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-01-26 8:28 ` [PATCH net-next 3/5] net/smc: replace sock_put worker by socket refcounting Ursula Braun
2018-01-26 15:42 ` [PATCH net-next 0/5] net/smc: fixes 2018-01-26 David Miller
2018-01-26 8:28 ` [PATCH net-next 4/5] net/smc: release clcsock from tcp_listen_worker Ursula Braun
2018-01-26 8:28 ` Ursula Braun [this message]
[not found] ` <20180126082850.20655-6-ubraun-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-01-26 15:57 ` [PATCH net-next 5/5] net/smc: return booleans instead of integers Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180126082850.20655-6-ubraun@linux.vnet.ibm.com \
--to=ubraun@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=jwi@linux.vnet.ibm.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).