Skip to content

Commit a5f526e

Browse files
committed
CodingStyle: Inclusive Terminology
Linux maintains a coding-style and its own idiomatic set of terminology. Update the style guidelines to recommend replacements for the terms master/slave and blacklist/whitelist. Link: http://lore.kernel.org/r/159389297140.2210796.13590142254668787525.stgit@dwillia2-desk3.amr.corp.intel.com Acked-by: Randy Dunlap <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: SeongJae Park <[email protected]> Acked-by: Christian Brauner <[email protected]> Acked-by: James Bottomley <[email protected]> Acked-by: Daniel Vetter <[email protected]> Acked-by: Andy Lutomirski <[email protected]> Acked-by: Laura Abbott <[email protected]> Acked-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Reviewed-by: Mark Brown <[email protected]> Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]> Signed-off-by: Shuah Khan <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Olof Johansson <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Signed-off-by: Chris Mason <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Dan Williams <[email protected]>
1 parent 9ebcfad commit a5f526e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Documentation/process/coding-style.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,26 @@ If you are afraid to mix up your local variable names, you have another
319319
problem, which is called the function-growth-hormone-imbalance syndrome.
320320
See chapter 6 (Functions).
321321

322+
For symbol names and documentation, avoid introducing new usage of
323+
'master / slave' (or 'slave' independent of 'master') and 'blacklist /
324+
whitelist'.
325+
326+
Recommended replacements for 'master / slave' are:
327+
'{primary,main} / {secondary,replica,subordinate}'
328+
'{initiator,requester} / {target,responder}'
329+
'{controller,host} / {device,worker,proxy}'
330+
'leader / follower'
331+
'director / performer'
332+
333+
Recommended replacements for 'blacklist/whitelist' are:
334+
'denylist / allowlist'
335+
'blocklist / passlist'
336+
337+
Exceptions for introducing new usage is to maintain a userspace ABI/API,
338+
or when updating code for an existing (as of 2020) hardware or protocol
339+
specification that mandates those terms. For new specifications
340+
translate specification usage of the terminology to the kernel coding
341+
standard where possible.
322342

323343
5) Typedefs
324344
-----------

0 commit comments

Comments
 (0)