RFC Guiding Use of ssleep over msleep for Whole-Second Delays
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest1 patch 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | checkpatch: Add warning for msleep with durations suitable for ssleepscripts/ | +10 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/1] Guiding Use of ssleep over msleep for Whole-Second Delays
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(+)
Signature · 1 line
2.44.0