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>
This commit is contained in:
parent
3d950c3407
commit
ee6584bf3c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue