We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ba1d72 commit 26606ceCopy full SHA for 26606ce
Documentation/process/coding-style.rst
@@ -69,9 +69,26 @@ something to hide:
69
if (condition) do_this;
70
do_something_everytime;
71
72
+Don't use commas to avoid using braces:
73
+
74
+.. code-block:: c
75
76
+ if (condition)
77
+ do_this(), do_that();
78
79
+Always uses braces for multiple statements:
80
81
82
83
+ if (condition) {
84
+ do_this();
85
+ do_that();
86
+ }
87
88
Don't put multiple assignments on a single line either. Kernel coding style
89
is super simple. Avoid tricky expressions.
90
91
92
Outside of comments, documentation and except in Kconfig, spaces are never
93
used for indentation, and the above example is deliberately broken.
94
0 commit comments