From: Jiapeng Chong Date: Fri, 4 Mar 2022 05:57:42 +0000 (+0800) Subject: crypto: marvell/octeontx - Use swap() instead of open coding it X-Git-Tag: v5.18-rc1~199^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee6584bf3c680e20464e20bf28066d1ce685f7d3;p=thirdparty%2Flinux.git crypto: marvell/octeontx - Use swap() instead of open coding it Clean the following coccicheck warning: ./drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1645:16-17: WARNING opportunity for swap(). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c b/drivers/crypto/marvell/octeontx/otx_cptvf_algs.c index ccbef01888d42..01c48ddc4eeb4 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,