* [cryptodev:master 118/125] 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
@ 2015-08-12 4:50 kbuild test robot
2015-08-12 4:50 ` [PATCH] crypto: fix simple_return.cocci warnings kbuild test robot
0 siblings, 1 reply; 3+ 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
tree: git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head: d5cf4023ebcbae13e14e3ab3c55cb744321b352e
commit: ed8ccaef52fa03fb03cff45b380f72c9f869f273 [118/125] crypto: qat - Add support for SRIOV
coccinelle warnings: (new ones prefixed by >>)
>> 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
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] crypto: fix simple_return.cocci warnings
2015-08-12 4:50 [cryptodev:master 118/125] 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 kbuild test robot
@ 2015-08-12 4:50 ` kbuild test robot
2015-08-13 7:17 ` Herbert Xu
0 siblings, 1 reply; 3+ 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] 3+ 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; 3+ 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] 3+ messages in thread
end of thread, other threads:[~2015-08-13 7:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-12 4:50 [cryptodev:master 118/125] 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 kbuild test robot
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