summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2018-07-27 11:09:13 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-07-31 05:17:53 +0200
commitd6aec1ca7c7c69e5b83b2cb24a57e7860d15507f (patch)
tree98ce6107026b9fc47858e69b47fcb385ae56968e /drivers/scsi
parentscsi: message: fusion: Replace GFP_ATOMIC with GFP_KERNEL (diff)
downloadlinux-d6aec1ca7c7c69e5b83b2cb24a57e7860d15507f.tar.xz
linux-d6aec1ca7c7c69e5b83b2cb24a57e7860d15507f.zip
scsi: a100u2w: Replace mdelay() with msleep()
wait_chip_ready() and wait_firmware_ready() are never called in atomic context. They call mdelay() to busy wait which is not necessary. mdelay() can be replaced with msleep(). 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: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/a100u2w.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index b2942ec3d455..23b17621b6d2 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -143,7 +143,7 @@ static u8 wait_chip_ready(struct orc_host * host)
for (i = 0; i < 10; i++) { /* Wait 1 second for report timeout */
if (inb(host->base + ORC_HCTRL) & HOSTSTOP) /* Wait HOSTSTOP set */
return 1;
- mdelay(100);
+ msleep(100);
}
return 0;
}
@@ -155,7 +155,7 @@ static u8 wait_firmware_ready(struct orc_host * host)
for (i = 0; i < 10; i++) { /* Wait 1 second for report timeout */
if (inb(host->base + ORC_HSTUS) & RREADY) /* Wait READY set */
return 1;
- mdelay(100); /* wait 100ms before try again */
+ msleep(100); /* wait 100ms before try again */
}
return 0;
}