* [PATCH] crypto: fix simple_return.cocci warnings
[not found] <201508121211.ta8z9Ugl%fengguang.wu@intel.com>
@ 2015-08-12 4:50 ` kbuild test robot
2015-08-13 7:17 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2015-08-12 4:50 UTC (permalink / raw)
To: Tadeusz Struk
Cc: kbuild-all, Herbert Xu, linux-crypto, qat-linux, linux-kernel
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);
}
/**
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: fix simple_return.cocci warnings
2015-08-12 4:50 ` [PATCH] crypto: fix simple_return.cocci warnings kbuild test robot
@ 2015-08-13 7:17 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2015-08-13 7:17 UTC (permalink / raw)
To: kbuild test robot
Cc: Tadeusz Struk, kbuild-all, linux-crypto, qat-linux, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-13 7:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201508121211.ta8z9Ugl%fengguang.wu@intel.com>
2015-08-12 4:50 ` [PATCH] crypto: fix simple_return.cocci warnings kbuild test robot
2015-08-13 7:17 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox