Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1205582 > unrolled thread

[PATCH] crypto: fix simple_return.cocci warnings

Started bykbuild test robot <fengguang.wu@intel.com>
First post2015-08-12 07:00 +0200
Last post2015-08-13 09:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] crypto: fix simple_return.cocci warnings kbuild test robot <fengguang.wu@intel.com> - 2015-08-12 07:00 +0200
    Re: [PATCH] crypto: fix simple_return.cocci warnings Herbert Xu <herbert@gondor.apana.org.au> - 2015-08-13 09:20 +0200

#1205582 — [PATCH] crypto: fix simple_return.cocci warnings

Fromkbuild test robot <fengguang.wu@intel.com>
Date2015-08-12 07:00 +0200
Subject[PATCH] crypto: fix simple_return.cocci warnings
Message-ID<pWwiS-24c-9@gated-at.bofh.it>
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 <tadeusz.struk@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 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);
 }
 
 /**
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1206554

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2015-08-13 09:20 +0200
Message-ID<pWUXU-4He-19@gated-at.bofh.it>
In reply to#1205582
On Wed, Aug 12, 2015 at 12:50:17PM +0800, kbuild test robot wrote:
> 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 <tadeusz.struk@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web