* [PATCH] crypto: octeontx2 -Use swap() instead of swap_engines()
@ 2021-12-16 7:48 Jiapeng Chong
2021-12-24 3:25 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-12-16 7:48 UTC (permalink / raw)
To: bbrezillon
Cc: arno, schalla, herbert, davem, linux-crypto, linux-kernel,
Jiapeng Chong, Abaci Robot
Fix the following coccicheck warning:
./drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1523:16-17:
WARNING opportunity for swap().
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
index 57307eac541c..9aef37972246 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
@@ -1514,16 +1514,6 @@ int otx2_cpt_discover_eng_capabilities(struct otx2_cptpf_dev *cptpf)
return ret;
}
-static void swap_engines(struct otx2_cpt_engines *engsl,
- struct otx2_cpt_engines *engsr)
-{
- struct otx2_cpt_engines engs;
-
- engs = *engsl;
- *engsl = *engsr;
- *engsr = engs;
-}
-
int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf,
struct devlink_param_gset_ctx *ctx)
{
@@ -1624,7 +1614,7 @@ int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf,
}
/* Keep SE engines at zero index */
if (engs[1].type == OTX2_CPT_SE_TYPES)
- swap_engines(&engs[0], &engs[1]);
+ swap(engs[0], engs[1]);
}
mutex_lock(&eng_grps->lock);
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] crypto: octeontx2 -Use swap() instead of swap_engines()
2021-12-16 7:48 [PATCH] crypto: octeontx2 -Use swap() instead of swap_engines() Jiapeng Chong
@ 2021-12-24 3:25 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2021-12-24 3:25 UTC (permalink / raw)
To: Jiapeng Chong
Cc: bbrezillon, arno, schalla, davem, linux-crypto, linux-kernel,
Abaci Robot
On Thu, Dec 16, 2021 at 03:48:14PM +0800, Jiapeng Chong wrote:
> Fix the following coccicheck warning:
>
> ./drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1523:16-17:
> WARNING opportunity for swap().
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
Patch applied. Thanks.
--
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:[~2021-12-24 3:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 7:48 [PATCH] crypto: octeontx2 -Use swap() instead of swap_engines() Jiapeng Chong
2021-12-24 3:25 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®