diff options
author | chiminghao <chi.minghao@zte.com.cn> | 2021-11-09 11:35:03 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-11-20 07:02:09 +0300 |
commit | 3121d5d1181885d9e01436fbdac78646617fb42f (patch) | |
tree | d5f7a7547d9def628b31e37f4ef713ad782761cd /drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c | |
parent | a9887010ed2da3fddaff83ceec80e2b71be8a966 (diff) | |
download | linux-3121d5d1181885d9e01436fbdac78646617fb42f.tar.xz |
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 <zealci@zte.com.cn>
Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c')
-rw-r--r-- | drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c index 877a948469bd..2748a3327e39 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, |