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: <1614669013-1755-1-git-send-email-mdalam@codeaurora.org>
Date:   Tue,  2 Mar 2021 12:40:13 +0530
From:   Md Sadre Alam <mdalam@...eaurora.org>
To:     agross@...nel.org, bjorn.andersson@...aro.org, broonie@...nel.org,
        linux-arm-msm@...r.kernel.org, linux-spi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Md Sadre Alam <mdalam@...eaurora.org>
Subject: [PATCH] spi: qup: Change usleep_range to udelay

Change usleep_range() to udelay(). Since delay request
for 1 to 2 usec so we have to use udelay() instead of
usleep_range() as per kernel documentation.

Signed-off-by: Md Sadre Alam <mdalam@...eaurora.org>
---
 drivers/spi/spi-qup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index 8dcb2e7..37b013f 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -189,7 +189,7 @@ static int spi_qup_set_state(struct spi_qup *controller, u32 state)
 	loop = 0;
 	while (!spi_qup_is_valid_state(controller)) {
 
-		usleep_range(SPI_DELAY_THRESHOLD, SPI_DELAY_THRESHOLD * 2);
+		udelay(SPI_DELAY_THRESHOLD);
 
 		if (++loop > SPI_DELAY_RETRY)
 			return -EIO;
@@ -217,7 +217,7 @@ static int spi_qup_set_state(struct spi_qup *controller, u32 state)
 	loop = 0;
 	while (!spi_qup_is_valid_state(controller)) {
 
-		usleep_range(SPI_DELAY_THRESHOLD, SPI_DELAY_THRESHOLD * 2);
+		udelay(SPI_DELAY_THRESHOLD);
 
 		if (++loop > SPI_DELAY_RETRY)
 			return -EIO;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ