Messages in this thread Patch in this message | | | Date | Fri, 4 Mar 2016 20:10:57 +0800 | From | kbuild test robot <> | 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(
| |