From: chiminghao Date: Tue, 9 Nov 2021 08:35:03 +0000 (+0000) Subject: crypto: octeontx2 - use swap() to make code cleaner X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3121d5d1181885d9e01436fbdac78646617fb42f;p=linux.git crypto: octeontx2 - use swap() to make code cleaner Fix the following coccicheck REVIEW: ./drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c:1688:16-17 use swap() to make code cleaner Reported-by: Zeal Robot Signed-off-by: chiminghao Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c index 877a948469bd1..2748a3327e391 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c @@ -1682,11 +1682,8 @@ static void swap_func(void *lptr, void *rptr, int size) { struct cpt_device_desc *ldesc = lptr; struct cpt_device_desc *rdesc = rptr; - struct cpt_device_desc desc; - desc = *ldesc; - *ldesc = *rdesc; - *rdesc = desc; + swap(*ldesc, *rdesc); } int otx2_cpt_crypto_init(struct pci_dev *pdev, struct module *mod,