lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1514632239-14895-1-git-send-email-baijiaju1990@gmail.com>
Date:   Sat, 30 Dec 2017 19:10:39 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     jejb@...ux.vnet.ibm.com, martin.petersen@...cle.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jia-Ju Bai <baijiaju1990@...il.com>
Subject: [PATCH] scsi: imm: Replace mdelay with msleep in imm_init

imm_init is not called in an interrupt handler 
nor holding a spinlock.
The function mdelay in it can be replaced with msleep, 
to reduce busy wait.

Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
---
 drivers/scsi/imm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 87c9419..4805c0e 100644
--- a/drivers/scsi/imm.c
+++ b/drivers/scsi/imm.c
@@ -591,9 +591,9 @@ static int imm_init(imm_struct *dev)
 	if (imm_connect(dev, 0) != 1)
 		return -EIO;
 	imm_reset_pulse(dev->base);
-	mdelay(1);	/* Delay to allow devices to settle */
+	msleep(1);	/* Delay to allow devices to settle */
 	imm_disconnect(dev);
-	mdelay(1);	/* Another delay to allow devices to settle */
+	msleep(1);	/* Another delay to allow devices to settle */
 	return device_check(dev);
 }
 
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ