Re: [PATCH] thermal: armada: replace msleep with usleep_range for short durations
From: Daniel Lezcano
Date: Mon May 18 2026 - 14:00:54 EST
On 5/11/26 17:37, Mayur Kumar wrote:
The checkpatch tool warns that msleep(10) can sleep for up to 20ms.
According to Documentation/timers/timers-howto.rst, usleep_range()
should be used for delays between 1ms and 20ms to provide better
timing accuracy.
Replace the 10ms msleep with a 10ms-11ms usleep_range.
Signed-off-by: Mayur Kumar <kmayur809@xxxxxxxxx>
---
Miquel,
if you are not against this change, I'll pick it up
Thanks
drivers/thermal/armada_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index c2fbdb534f6..96965f393b4 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -178,7 +178,7 @@ static void armada370_init(struct platform_device *pdev,
regmap_write(priv->syscon, data->syscon_control1_off, reg);
- msleep(10);
+ usleep_range(10000, 11000);
}
static void armada375_init(struct platform_device *pdev,