crypto: cavium - Replace mdelay with msleep in cpt_device_init
authorJia-Ju Bai <baijiaju1990@gmail.com>
Sun, 18 Mar 2018 14:50:38 +0000 (22:50 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 23 Mar 2018 15:48:43 +0000 (23:48 +0800)
commite9acf05255cbf72dc32169957d2895cbfd12c7e1
treef7c9d3819a06687a939b4578882e6247d0fcc726
parent0063ec4459dcf1583c7aa84ada0f7125450d9245
crypto: cavium - Replace mdelay with msleep in cpt_device_init

cpt_device_init() is never called in atomic context.

The call chain ending up at cpt_device_init() is:
[1] cpt_device_init() <- cpt_probe()
cpt_probe() is only set as ".probe" in pci_driver structure
"cpt_pci_driver".

Despite never getting called from atomic context, cpt_device_init() calls
mdelay(100), i.e. busy wait for 100ms.
That is not necessary and can be replaced with msleep to
avoid busy waiting.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/cavium/cpt/cptpf_main.c