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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Jan 2017 16:35:53 +0100
From:   Nicholas Mc Guire <>
To:     Jonathan Cameron <>
Cc:     Hartmut Knaack <>,
        Lars-Peter Clausen <>,
        Peter Meerwald-Stadler <>,
        Matt Ranostay <>,,, Nicholas Mc Guire <>
Subject: [PATCH] iio: health: max30100: use msleep() for long uncritical delays

ulseep_range() uses hrtimers and provides no advantage over msleep()
for larger delays. Fix up the 35ms delays here to use msleep() and
reduce the load on the hrtimer subsystem. 

Fixes: commit 4d33615df58b ("iio: light: add MAX30100 oximeter driver support")
Signed-off-by: Nicholas Mc Guire <>
Problem located with coccinelle script

Patch was compile tested with: x86_64_defconfig + CONFIG_IIO=m + 

Patch is aginast 4.10-rc3 (localversion-next is next-20170116)

 drivers/iio/health/max30100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
index 90ab8a2d..9648c69 100644
--- a/drivers/iio/health/max30100.c
+++ b/drivers/iio/health/max30100.c
@@ -378,7 +378,7 @@ static int max30100_get_temp(struct max30100_data *data, int *val)
 	if (ret)
 		return ret;
-	usleep_range(35000, 50000);
+	msleep(35);
 	return max30100_read_temp(data, val);

Powered by blists - more mailing lists