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: 10348511 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 3662660542 for ; Wed, 18 Apr 2018 15:39:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25FCC286BE for ; Wed, 18 Apr 2018 15:39:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A485286C2; Wed, 18 Apr 2018 15:39:49 +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 B86EA286C7 for ; Wed, 18 Apr 2018 15:39:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753810AbeDRPjo (ORCPT ); Wed, 18 Apr 2018 11:39:44 -0400 Received: from mga01.intel.com ([192.55.52.88]:27363 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754066AbeDRPjm (ORCPT ); Wed, 18 Apr 2018 11:39:42 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2018 08:39:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,465,1517904000"; d="scan'208";a="35226291" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga006.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 1f8pBL-000TrQ-4k; Wed, 18 Apr 2018 23:39:39 +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.GA69092@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_obj.c:122:5-8: Unneeded variable: "err". Return "0" on line 126 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_obj.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_obj.c +++ b/drivers/infiniband/sw/rfc/rfc_obj.c @@ -119,11 +119,9 @@ struct device *rfc_dma_device(struct rfc int rfc_prepare(struct rfc_dev *rfc, struct rfc_obj_info *obj, struct sg_table *rsg, u32 *crc) { - int err = 0; - *crc = 0xABCD; - return err; + return 0; } static int rfc_send_blk(struct sg_table *rsg, int len, void *data);