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]
Date:	Sun, 13 Sep 2015 22:46:06 +0530
From:	Shraddha Barke <shraddha.6596@...il.com>
To:	Marek Belisko <marek.belisko@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Joe Perches <joe@...ches.com>,
	Julia Lawall <julia.lawall@...6.fr>
Cc:	linux-kernel@...r.kernel.org,
	Shraddha Barke <shraddha.6596@...il.com>
Subject: [PATCH] Staging: ft1000: use usleep_range()

This patch fixes checkpatch.pl warning
WARNING : msleep < 20ms can sleep for up to 20ms; see
Documentation/timers/timers-howto.txt

Signed-off-by: Shraddha Barke <shraddha.6596@...il.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_download.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 297b7ae..cf85021 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -131,7 +131,7 @@ static int check_usb_db(struct ft1000_usb *ft1000dev)
 			break;
 		}
 		loopcnt++;
-		msleep(10);
+		usleep_range(10000, 11000);
 
 	}
 
@@ -142,7 +142,7 @@ static int check_usb_db(struct ft1000_usb *ft1000dev)
 		pr_debug("Doorbell = 0x%x\n", temp);
 		if (temp & 0x8000) {
 			loopcnt++;
-			msleep(10);
+			usleep_range(10000, 11000);
 		} else	{
 			pr_debug("door bell is cleared, return 0\n");
 			return 0;
@@ -191,7 +191,7 @@ static u16 get_handshake(struct ft1000_usb *ft1000dev, u16 expected_value)
 			return handshake;
 		}
 		loopcnt++;
-		msleep(10);
+		usleep_range(10000, 11000);
 	}
 
 	return HANDSHAKE_TIMEOUT_VALUE;
@@ -254,7 +254,7 @@ static u16 get_handshake_usb(struct ft1000_usb *ft1000dev, u16 expected_value)
 		}
 
 		loopcnt++;
-		msleep(10);
+		usleep_range(10000, 11000);
 		handshake = ntohs(handshake);
 		if ((handshake == expected_value) ||
 		    (handshake == HANDSHAKE_RESET_VALUE_USB))
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ