2019-06-11 12:17:07

by Bitan Biswas

[permalink] [raw]
Subject: [PATCH V5 5/7] i2c: tegra: fix msleep warning

Fix checkpatch.pl WARNING for delay of approximately 1msec
in flush i2c FIFO polling loop by using usleep_range(1000, 2000):
WARNING: msleep < 20ms can sleep for up to 20ms; see ...
Documentation/timers/timers-howto.txt
+ msleep(1);

Signed-off-by: Bitan Biswas <[email protected]>
Reviewed-by: Dmitry Osipenko <[email protected]>
---
drivers/i2c/busses/i2c-tegra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index bececa6..4dfb4c1 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -476,7 +476,7 @@ static int tegra_i2c_flush_fifos(struct tegra_i2c_dev *i2c_dev)
dev_warn(i2c_dev->dev, "timeout waiting for fifo flush\n");
return -ETIMEDOUT;
}
- msleep(1);
+ usleep_range(1000, 2000);
}
return 0;
}
--
2.7.4


2019-06-12 14:35:03

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH V5 5/7] i2c: tegra: fix msleep warning

On Tue, Jun 11, 2019 at 03:51:12AM -0700, Bitan Biswas wrote:
> Fix checkpatch.pl WARNING for delay of approximately 1msec
> in flush i2c FIFO polling loop by using usleep_range(1000, 2000):
> WARNING: msleep < 20ms can sleep for up to 20ms; see ...
> Documentation/timers/timers-howto.txt
> + msleep(1);
>
> Signed-off-by: Bitan Biswas <[email protected]>
> Reviewed-by: Dmitry Osipenko <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (466.00 B)
signature.asc (849.00 B)
Download all attachments