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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dd54cda2-b314-3ae6-c330-363cfa7959a1@collabora.com>
Date:   Wed, 2 Oct 2019 18:05:26 -0300
From:   André Almeida <andrealmeid@...labora.com>
To:     Bart Van Assche <bvanassche@....org>, Jens Axboe <axboe@...nel.dk>,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     kernel@...labora.com, krisman@...labora.com
Subject: Re: [PATCH 1/1] blk-mq: fill header with kernel-doc

Hello Bart,

On 10/2/19 5:27 PM, Bart Van Assche wrote:
> On 10/1/19 8:33 PM, Jens Axboe wrote:
>> On 9/30/19 1:48 PM, André Almeida wrote:
>>> -
>>> +/**
>>> + * struct blk_mq_ops - list of callback functions for blk-mq drivers
>>> + */
>>>    struct blk_mq_ops {
>>> -    /*
>>> -     * Queue request
>>> +    /**
>>> +     * @queue_rq: Queue a new request from block IO.
>>>         */
>>>        queue_rq_fn        *queue_rq;
>>>    -    /*
>>> -     * If a driver uses bd->last to judge when to submit requests to
>>> -     * hardware, it must define this function. In case of errors that
>>> -     * make us stop issuing further requests, this hook serves the
>>> +    /**
>>> +     * @commit_rqs: If a driver uses bd->last to judge when to submit
>>> +     * requests to hardware, it must define this function. In case
>>> of errors
>>> +     * that make us stop issuing further requests, this hook serves the
>>>         * purpose of kicking the hardware (which the last request
>>> otherwise
>>>         * would have done).
>>>         */
>>>        commit_rqs_fn        *commit_rqs;
>>
>> Stuff like this is MUCH better. Why isn't all of it done like this?
>
> Hi Jens,
> 
> If you prefer this style you may want to update
> Documentation/doc-guide/kernel-doc.rst. I think that document recommends
> another style for documenting struct members, maybe because that style
> requires less vertical space:

The same documentation also suggests that one can use inline comments:

In-line member documentation comments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The structure members may also be documented in-line within the definition.
There are two styles, single-line comments where both the opening
``/**`` and
closing ``*/`` are on the same line, and multi-line comments where they
are each
on a line of their own, like all other kernel-doc comments::

  /**
   * struct foo - Brief description.
   * @foo: The Foo member.
   */
  struct foo {
        int foo;
        /**
         * @bar: The Bar member.
         */
...


You can also check this here:
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#in-line-member-documentation-comments

Thanks,
	André

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ