From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753881AbbHLEui (ORCPT ); Wed, 12 Aug 2015 00:50:38 -0400 Received: from mga01.intel.com ([192.55.52.88]:53506 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbbHLEuh (ORCPT ); Wed, 12 Aug 2015 00:50:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,658,1432623600"; d="scan'208";a="782435928" Date: Wed, 12 Aug 2015 12:50:17 +0800 From: kbuild test robot To: Tadeusz Struk Cc: kbuild-all@01.org, Herbert Xu , linux-crypto@vger.kernel.org, qat-linux@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: fix simple_return.cocci warnings Message-ID: <20150812045017.GA5772@ivytown2> References: <201508121211.ta8z9Ugl%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201508121211.ta8z9Ugl%fengguang.wu@intel.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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drivers/crypto/qat/qat_common/adf_sriov.c:258:1-4: WARNING: end returns can be simpified and declaration on line 212 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Tadeusz Struk Signed-off-by: Fengguang Wu --- adf_sriov.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) --- a/drivers/crypto/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/qat/qat_common/adf_sriov.c @@ -209,7 +209,7 @@ static int adf_enable_sriov(struct adf_a &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)]; void __iomem *pmisc_addr = pmisc->virt_addr; struct adf_accel_vf_info *vf_info; - int i, ret; + int i; u32 reg; /* Workqueue for PF2VF responses */ @@ -255,11 +255,7 @@ static int adf_enable_sriov(struct adf_a * order for all the hardware resources (i.e. bundles) to be usable. * When SR-IOV is enabled, each of the VFs will own one bundle. */ - ret = pci_enable_sriov(pdev, totalvfs); - if (ret) - return ret; - - return 0; + return pci_enable_sriov(pdev, totalvfs); } /**