[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230304041932.847133-3-wei.w.wang@intel.com>
Date: Sat, 4 Mar 2023 12:19:31 +0800
From: Wei Wang <wei.w.wang@...el.com>
To: arnd@...db.de, akpm@...ux-foundation.org, keescook@...omium.org,
herbert@...dor.apana.org.au, josh@...htriplett.org,
jani.nikula@...el.com, corbet@....net, jgg@...lanox.com,
dmatlack@...gle.com, mizhang@...gle.com, pbonzini@...hat.com,
seanjc@...gle.com
Cc: linux-kernel@...r.kernel.org, Wei Wang <wei.w.wang@...el.com>
Subject: [PATCH v1 2/3] Documentation/CodingStyle: do not use data type names as variable names
Observed some merged code uses "bool" as variable name. This is
confusion either for the reader or compilier. Add a rule to have
programmers avoid using data types as variable names.
Signed-off-by: Wei Wang <wei.w.wang@...el.com>
---
Documentation/process/coding-style.rst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
index 007e49ef6cec..6d7f4069d55d 100644
--- a/Documentation/process/coding-style.rst
+++ b/Documentation/process/coding-style.rst
@@ -356,6 +356,9 @@ specification that mandates those terms. For new specifications
translate specification usage of the terminology to the kernel coding
standard where possible.
+"bool", "int", "long" etc. are specific names for data types, C
+programmers should not use them as variable names.
+
5) Typedefs
-----------
--
2.27.0
Powered by blists - more mailing lists