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 returnvar.cocci warnings
drivers/infiniband/hw/hisilicon/hns/hns_roce_v1_hw.c:1562:5-8: Unneeded variable: "ret". Return "0" on line 1587


Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Wei Hu(Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

hns_roce_v1_hw.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/infiniband/hw/hisilicon/hns/hns_roce_v1_hw.c
+++ b/drivers/infiniband/hw/hisilicon/hns/hns_roce_v1_hw.c
@@ -1559,7 +1559,6 @@ int hns_roce_v1_req_notify_cq(struct ib_
struct hns_roce_cq *hr_cq = to_hr_cq(ibcq);
u32 notification_flag;
u32 doorbell[2];
- int ret = 0;

notification_flag = (flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED ?
CQ_DB_REQ_NOT : CQ_DB_REQ_NOT_SOL;
@@ -1584,7 +1583,7 @@ int hns_roce_v1_req_notify_cq(struct ib_

hns_roce_write64_k(doorbell, hr_cq->cq_db_l);

- return ret;
+ return 0;
}

static int hns_roce_v1_poll_one(
\
 
 \ /
  Last update: 2016-03-04 14:01    [W:0.072 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site