lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Mar 2019 17:46:42 +0800
From:   Chao Fan <fanc.fnst@...fujitsu.com>
To:     Baoquan He <bhe@...hat.com>
CC:     Michal Hocko <mhocko@...nel.org>, <linux-kernel@...r.kernel.org>,
        <linux-mm@...ck.org>, <akpm@...ux-foundation.org>,
        <rppt@...ux.ibm.com>, <osalvador@...e.de>, <willy@...radead.org>,
        <william.kucharski@...cle.com>
Subject: Re: [PATCH v2 1/4] mm/sparse: Clean up the obsolete code comment

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@...hat.com>
>> >> 
>> >> 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

>
>


Powered by blists - more mailing lists