lkml.org 
[lkml]   [2016]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] infiniband: hns: fix boolreturn.cocci warnings
drivers/infiniband/hw/hisilicon/hns/hns_roce_qp.c:906:9-10: WARNING: return of 0/1 in function 'hns_roce_wq_overflow' 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: Wei Hu(Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

hns_roce_qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/infiniband/hw/hisilicon/hns/hns_roce_qp.c
+++ b/drivers/infiniband/hw/hisilicon/hns/hns_roce_qp.c
@@ -903,7 +903,7 @@ bool hns_roce_wq_overflow(struct hns_roc

cur = hr_wq->head - hr_wq->tail;
if (likely(cur + nreq < hr_wq->max_post))
- return 0;
+ return false;

hr_cq = to_hr_cq(ib_cq);
spin_lock(&hr_cq->lock);
\
 
 \ /
  Last update: 2016-03-04 14:01    [W:0.138 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site