diff options
author | Jia-Ju Bai <baijiaju1990@gmail.com> | 2018-03-18 15:50:38 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-03-23 16:48:43 +0100 |
commit | e9acf05255cbf72dc32169957d2895cbfd12c7e1 (patch) | |
tree | f7c9d3819a06687a939b4578882e6247d0fcc726 /drivers/crypto/cavium | |
parent | crypto: doc - Document remaining members in struct crypto_alg (diff) | |
download | linux-e9acf05255cbf72dc32169957d2895cbfd12c7e1.tar.xz linux-e9acf05255cbf72dc32169957d2895cbfd12c7e1.zip |
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>
Diffstat (limited to 'drivers/crypto/cavium')
-rw-r--r-- | drivers/crypto/cavium/cpt/cptpf_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/cavium/cpt/cptpf_main.c b/drivers/crypto/cavium/cpt/cptpf_main.c index 34a6d8bf229e..06ad85ab5e86 100644 --- a/drivers/crypto/cavium/cpt/cptpf_main.c +++ b/drivers/crypto/cavium/cpt/cptpf_main.c @@ -436,7 +436,7 @@ static int cpt_device_init(struct cpt_device *cpt) /* Reset the PF when probed first */ cpt_reset(cpt); - mdelay(100); + msleep(100); /*Check BIST status*/ bist = (u64)cpt_check_bist_status(cpt); |