[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87frx4r8dt.wl-me@linux.beauty>
Date: Tue, 05 Mar 2024 23:44:14 +0800
From: Li Chen <me@...ux.beauty>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>, Dwaipayan Ray <dwaipayanray1@...il.com>, Lukas Bulwahn <lukas.bulwahn@...il.com>, linux-kernel@...r.kernel.org
Subject: [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(+)
--
2.44.0
Powered by blists - more mailing lists