public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] Guiding Use of ssleep over msleep for Whole-Second Delays
@ 2024-03-05 15:44 Li Chen
  2024-03-05 15:47 ` [RFC PATCH 1/1] checkpatch: Add warning for msleep with durations suitable for ssleep Li Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Li Chen @ 2024-03-05 15:44 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	linux-kernel



This change particularly targets replacing msleep() with ssleep() for
delays that are clear multiples of 1000ms, enhancing code semantics and
readability.

I'm contemplating a kernel-wide update to conform to this practice,
pending community feedback. While a sed script
(like '/\bmsleep\s*\(\s*([0-9]+000)\s*\);/{s/\bmsleep\s*\(\s*([0-9]+)000\s*\);/ssleep(\1);/g}')
could automate this, I'm cautious of potential implications and seek
your thoughts on both the patch and the idea of a broad codebase update.

Li Chen (1):
  checkpatch: Add warning for msleep with durations suitable for ssleep

 scripts/checkpatch.pl | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.44.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-09 19:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 15:44 [RFC PATCH 0/1] Guiding Use of ssleep over msleep for Whole-Second Delays Li Chen
2024-03-05 15:47 ` [RFC PATCH 1/1] checkpatch: Add warning for msleep with durations suitable for ssleep Li Chen
2024-03-09 19:47   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox