From patchwork Wed Apr 18 15:39:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 10348509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C70176031B for ; Wed, 18 Apr 2018 15:39:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4315286BE for ; Wed, 18 Apr 2018 15:39:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A85E5286C5; Wed, 18 Apr 2018 15:39:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 350A6286BE for ; Wed, 18 Apr 2018 15:39:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753890AbeDRPjq (ORCPT ); Wed, 18 Apr 2018 11:39:46 -0400 Received: from mga04.intel.com ([192.55.52.120]:55206 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753279AbeDRPjo (ORCPT ); Wed, 18 Apr 2018 11:39:44 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2018 08:39:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,465,1517904000"; d="scan'208";a="34348394" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga007.jf.intel.com with ESMTP; 18 Apr 2018 08:39:39 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1f8pBK-000TqE-Sf; Wed, 18 Apr 2018 23:39:38 +0800 Date: Wed, 18 Apr 2018 23:39:34 +0800 From: kbuild test robot To: muneendra.kumar@broadcom.com Cc: kbuild-all@01.org, linux-rdma@vger.kernel.org, amit.tyagi@broadcom.com, anand.sundaram@broadcom.com, Muneendra Subject: [PATCH] fix returnvar.cocci warnings Message-ID: <20180418153934.GA69153@lkp-sb05> References: <20180418094240.26371-1-muneendra.kumar@broadcom.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180418094240.26371-1-muneendra.kumar@broadcom.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-Virus-Scanned: ClamAV using ClamSMTP From: Fengguang Wu drivers/infiniband/sw/rfc/rfc_verbs.c:1152:5-8: Unneeded variable: "err". Return "- 1" on line 1155 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Fixes: 7b62371a9e64 ("RDMA over Fibre Channel") CC: Muneendra Signed-off-by: Fengguang Wu --- Please take the patch only if it's a positive warning. Thanks! rfc_verbs.c | 4 +--- 1 file changed, 1 insertion(+), 3 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/sw/rfc/rfc_verbs.c +++ b/drivers/infiniband/sw/rfc/rfc_verbs.c @@ -1149,10 +1149,8 @@ static int rfc_map_mr_sg(struct ib_mr *i static int rfc_attach_mcast(struct ib_qp *ibqp, union ib_gid *mgid, u16 mlid) { - int err = -1; - // multicast not supported in rfc v1.0 - return err; + return -1; } static int rfc_detach_mcast(struct ib_qp *ibqp, union ib_gid *mgid, u16 mlid)