[PATCH 1/1] CodingStyle: clarify variable naming rules
From: Alexey Dobriyan
Date: Wed Jul 15 2026 - 11:48:45 EST
* sysctl stuff better have "sysctl" in its name to remind developers
to use READ_ONCE() and that their values can change at any time,
* variable holding physical time should append unit of time to the name,
to make life easier for developers and static checkers.
Jiffies aren't included because I'd be crucified for "_ji".
Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---
Documentation/process/coding-style.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
index a8336582f60b..d97ed5be4eab 100644
--- a/Documentation/process/coding-style.rst
+++ b/Documentation/process/coding-style.rst
@@ -356,6 +356,11 @@ specification that mandates those terms. For new specifications
translate specification usage of the terminology to the kernel coding
standard where possible.
+Variable holding sysctl value should have ``sysctl`` in its name.
+
+Variable measuring time should be suffixed with the unit of time it is measured in:
+``_s`` for seconds, ``_ms`` for milliseconds, ``_us`` for microseconds, ``_ns`` for nanoseconds.
+
5) Typedefs
-----------
--
2.54.0