crypto:otx2_cptvf_algs: use swap() to make code cleaner
Subsystems (3)
PATCH 1/1 crypto:otx2_cptvf_algs: use swap() to make code cleaner
From: chiminghao <[email protected]>
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 <[email protected]>
Signed-off-by chiminghao <[email protected]>
--- drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c +1 -4
@@ -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,
Signature · 1 line
2.25.1