File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -391,14 +391,33 @@ int timeout = TIMEOUT_INTERVAL * USEC_PER_SEC;
391391```
392392## Comments
393393* All comments should be written as C-style comments.
394+ * Long multi-Line comments should have a leading asterisk for the second and
395+ following lines. The first and last lines should be left empty and not contain
396+ any comment text.
397+ See also: [ Linux Kernel Coding Style] ( https://www.kernel.org/doc/html/v4.10/process/coding-style.html#commenting ) .
398+ * For short multi-line comments of two or three lines, a shorter style is
399+ also permissible, where the first and last line do not need to be left empty.
394400
395401E.g:
396402``` c
397403/* This is a C-style comment */
404+
405+ /* This is a short
406+ * multi-line comment (max 2-3 lines). */
407+
408+ /*
409+ * This is a long multi-
410+ * line comment for more
411+ * than three lines of
412+ * comment text.
413+ */
398414```
399415Wrong:
400416``` c
401417// C++ comment here
418+
419+ /* This is a multi-line comment
420+ without leading asterisk. */
402421```
403422
404423## Documentation
You can’t perform that action at this time.
0 commit comments