On Tue, Mar 26, 2019 at 05:43:48PM +0800, Baoquan He wrote: >On 03/26/19 at 05:36pm, Chao Fan wrote: >> On Tue, Mar 26, 2019 at 05:30:57PM +0800, Baoquan He wrote: >> >On 03/26/19 at 10:23am, Michal Hocko wrote: >> >> On Tue 26-03-19 17:02:24, Baoquan He wrote: >> >> > The code comment above sparse_add_one_section() is obsolete and >> >> > incorrect, clean it up and write new one. >> >> > >> >> > Signed-off-by: Baoquan He <bhe@xxxxxxxxxx> >> >> >> >> Please note that you need /** to start a kernel doc. Other than that. >> > >> >I didn't find a template in coding-style.rst, and saw someone is using >> >/*, others use /**. I will use '/**' instead. Thanks for telling. >> >> How to format kernel-doc comments >> --------------------------------- >> >> The opening comment mark ``/**`` is used for kernel-doc comments. The >> ``kernel-doc`` tool will extract comments marked this way. The rest of >> the comment is formatted like a normal multi-line comment with a column >> of asterisks on the left side, closing with ``*/`` on a line by itself. >> >> See Documentation/doc-guide/kernel-doc.rst for more details. >> Hope that can help you. > >Great, there's a specific kernel-doc file. Thanks, I will update and >repost this one with '/**'. In that file, there is also some sample for a function comment: Function documentation ---------------------- The general format of a function and function-like macro kernel-doc comment is:: /** * function_name() - Brief description of function. * @arg1: Describe the first argument. * @arg2: Describe the second argument. * One can provide multiple line descriptions * for arguments. * * A longer description, with more discussion of the function function_name() * that might be useful to those using or modifying it. Begins with an * empty comment line, and may include additional embedded empty * comment lines. * * The longer description may have multiple paragraphs. * * Context: Describes whether the function can sleep, what locks it takes, * releases, or expects to be held. It can extend over multiple * lines. * Return: Describe the return value of function_name. * * The return value description can also have multiple paragraphs, and should * be placed at the end of the comment block. */ Anyway, I think you can get more information in that document. Thanks, Chao Fan > >