* [PATCH] crypto: marvell/octeontx - Use swap() instead of open coding it
@ 2022-03-04 5:57 Jiapeng Chong
2022-03-09 3:22 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2022-03-04 5:57 UTC (permalink / raw)
To: bbrezillon
Cc: arno, schalla, herbert, davem, linux-crypto, linux-kernel,
Jiapeng Chong, Abaci Robot
Clean the following coccicheck warning:
./drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1645: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/octeontx/otx_cptvf_algs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c b/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
index ccbef01888d4..01c48ddc4eeb 100644
--- a/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
+++ b/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
@@ -1639,11 +1639,8 @@ static void swap_func(void *lptr, void *rptr, int size)
{
struct cpt_device_desc *ldesc = (struct cpt_device_desc *) lptr;
struct cpt_device_desc *rdesc = (struct cpt_device_desc *) rptr;
- struct cpt_device_desc desc;
- desc = *ldesc;
- *ldesc = *rdesc;
- *rdesc = desc;
+ swap(*ldesc, *rdesc);
}
int otx_cpt_crypto_init(struct pci_dev *pdev, struct module *mod,
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: marvell/octeontx - Use swap() instead of open coding it
2022-03-04 5:57 [PATCH] crypto: marvell/octeontx - Use swap() instead of open coding it Jiapeng Chong
@ 2022-03-09 3:22 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2022-03-09 3:22 UTC (permalink / raw)
To: Jiapeng Chong
Cc: bbrezillon, arno, schalla, davem, linux-crypto, linux-kernel,
Abaci Robot
On Fri, Mar 04, 2022 at 01:57:42PM +0800, Jiapeng Chong wrote:
> Clean the following coccicheck warning:
>
> ./drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1645: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/octeontx/otx_cptvf_algs.c | 5 +----
> 1 file changed, 1 insertion(+), 4 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:[~2022-03-09 3:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 5:57 [PATCH] crypto: marvell/octeontx - Use swap() instead of open coding it Jiapeng Chong
2022-03-09 3:22 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.