diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2022-03-04 13:57:42 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-03-09 15:12:31 +1200 |
commit | ee6584bf3c680e20464e20bf28066d1ce685f7d3 (patch) | |
tree | 325c199007b2b9f73d60a0af4efb9a25e8ae0e56 /drivers/crypto/marvell/octeontx | |
parent | 3d950c34074ed74d2713c3856ba01264523289e6 (diff) | |
download | linux-ee6584bf3c680e20464e20bf28066d1ce685f7d3.tar.gz linux-ee6584bf3c680e20464e20bf28066d1ce685f7d3.tar.bz2 linux-ee6584bf3c680e20464e20bf28066d1ce685f7d3.zip |
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 <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell/octeontx')
-rw-r--r-- | drivers/crypto/marvell/octeontx/otx_cptvf_algs.c | 5 |
1 files changed, 1 insertions, 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, |