Thread (29 messages) flat view 29 messages, 3 authors, 2016-09-02
STALE3638d

[PATCH] smc: fix boolreturn.cocci warnings

From: kbuild test robot <hidden>
Date: 2016-08-09 12:57:05
Also in: linux-s390

net/smc/smc_wr.c:274:10-11: WARNING: return of 0/1 in function 'smc_wr_tx_has_pending' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Ursula Braun <redacted>
Signed-off-by: Fengguang Wu <redacted>
---

 smc_wr.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/smc/smc_wr.c
+++ b/net/smc/smc_wr.c
@@ -271,9 +271,9 @@ bool smc_wr_tx_has_pending(struct smc_li
 			continue;
 		tx_pend = &link->wr_tx_pends[i].priv;
 		if (filter(tx_pend, data))
-			return 1;
+			return true;
 	}
-	return 0;
+	return false;
 }
 
 /****************************** receive queue ********************************/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help