Commit 3121d5d1 authored by chiminghao's avatar chiminghao Committed by Herbert Xu

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarchiminghao <chi.minghao@zte.com.cn>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent a9887010
...@@ -1682,11 +1682,8 @@ static void swap_func(void *lptr, void *rptr, int size) ...@@ -1682,11 +1682,8 @@ static void swap_func(void *lptr, void *rptr, int size)
{ {
struct cpt_device_desc *ldesc = lptr; struct cpt_device_desc *ldesc = lptr;
struct cpt_device_desc *rdesc = rptr; struct cpt_device_desc *rdesc = rptr;
struct cpt_device_desc desc;
desc = *ldesc; swap(*ldesc, *rdesc);
*ldesc = *rdesc;
*rdesc = desc;
} }
int otx2_cpt_crypto_init(struct pci_dev *pdev, struct module *mod, int otx2_cpt_crypto_init(struct pci_dev *pdev, struct module *mod,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment