From patchwork Fri Mar 4 12:10:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 8503501 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0702EC0553 for ; Fri, 4 Mar 2016 12:12:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D8382013D for ; Fri, 4 Mar 2016 12:12:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2C69D201BB for ; Fri, 4 Mar 2016 12:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752942AbcCDMMO (ORCPT ); Fri, 4 Mar 2016 07:12:14 -0500 Received: from mga11.intel.com ([192.55.52.93]:52615 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752683AbcCDMMJ (ORCPT ); Fri, 4 Mar 2016 07:12:09 -0500 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 04 Mar 2016 04:12:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,535,1449561600"; d="scan'208";a="758053499" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga003.jf.intel.com with ESMTP; 04 Mar 2016 04:12:05 -0800 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1aboaT-000Qwi-Gh; Fri, 04 Mar 2016 20:12:05 +0800 Date: Fri, 4 Mar 2016 20:10:57 +0800 From: kbuild test robot To: "Wei Hu(Xavier)" Cc: kbuild-all@01.org, dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, davem@davemloft.net, jeffrey.t.kirsher@intel.com, jiri@mellanox.com, ogerlitz@mellanox.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, gongyangming@huawei.com, xiaokun@huawei.com, tangchaofei@huawei.com, oulijun@huawei.com, haifeng.wei@huawei.com, yisen.zhuang@huawei.com, yankejian@huawei.com, lisheng011@huawei.com, charles.chenxin@huawei.com, linuxarm@huawei.com Subject: [PATCH] infiniband: hns: fix returnvar.cocci warnings Message-ID: <20160304121057.GA3950@lkp-nhm1.intel.com> References: <201603042059.A0IVxKAt%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1457080877-13456-5-git-send-email-xavier.huwei@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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) Signed-off-by: Fengguang Wu --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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(