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  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]
Date:   Mon, 15 Apr 2019 17:35:04 +0300
From:   Mohan Kumar <mohankumar718@...il.com>
To:     benh@...nel.crashing.org
Cc:     gustavo@...eddedor.com, linux-kernel@...r.kernel.org
Subject: [PATCH] drivers: fsi: This patch fix the following checkpatch warning.

As per Documentation/timers/timers-howto.txt Msleep < 20ms can sleep for
up to 20ms. so use usleep_range.

Signed-off-by: Mohan Kumar <mohankumar718@...il.com>
---
 drivers/fsi/fsi-master-ast-cf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/fsi/fsi-master-ast-cf.c b/drivers/fsi/fsi-master-ast-cf.c
index 04d10ea..60eccc7 100644
--- a/drivers/fsi/fsi-master-ast-cf.c
+++ b/drivers/fsi/fsi-master-ast-cf.c
@@ -588,7 +588,7 @@ static int fsi_master_acf_xfer(struct fsi_master_acf *master, uint8_t slave,
 		dev_dbg(master->dev, "ECRC retry %d\n", retries);
 
 		/* Pace it a bit before retry */
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 
 	return rc;
@@ -690,9 +690,9 @@ static int fsi_master_acf_break(struct fsi_master *_master, int link)
 static void reset_cf(struct fsi_master_acf *master)
 {
 	regmap_write(master->scu, SCU_COPRO_CTRL, SCU_COPRO_RESET);
-	usleep_range(20,20);
+	usleep_range(15, 20);
 	regmap_write(master->scu, SCU_COPRO_CTRL, 0);
-	usleep_range(20,20);
+	usleep_range(15, 20);
 }
 
 static void start_cf(struct fsi_master_acf *master)
@@ -913,7 +913,7 @@ static int copro_enable_sw_irq(struct fsi_master_acf *master)
 		val = ioread32(master->cvic + CVIC_EN_REG);
 		if (val & 2)
 			break;
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 	if (!(val & 2)) {
 		dev_err(master->dev, "Failed to enable coprocessor interrupt !\n");
@@ -970,7 +970,7 @@ static int fsi_master_acf_setup(struct fsi_master_acf *master)
 		val = ioread8(master->sram + CF_STARTED);
 		if (val)
 			break;
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 	if (!val) {
 		dev_err(master->dev, "Coprocessor startup timeout !\n");
-- 
2.7.4

Powered by blists - more mailing lists