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: <492af720-43ad-15d6-f21c-b94eea5442b5@gmail.com>
Date:   Tue, 22 Nov 2022 15:11:53 +0700
From:   Bagas Sanjaya <bagasdotme@...il.com>
To:     "Ahmed S. Darwish" <darwi@...utronix.de>
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-next@...r.kernel.org, linux-doc@...r.kernel.org,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH] PCI/MSI: api: Use bullet lists in kernel-doc comments

On 11/22/22 12:56, Ahmed S. Darwish wrote:
> On Tue, Nov 22, 2022 at 10:43:19AM +0700, Bagas Sanjaya wrote:
>>
>> For the list above, no, since if the alignment is kept, like:
>>
> 
> NAK.
> 
> Below patch works properly on my side, no Sphinx errors and proper HTML
> view, while still keeping proper-alignment in the C code.
> 
> Sorry, you're too focusing on the HTML side.
> 
> Making the C code readable, not just the HTML output, is quite
> important.
> 
> =>
> 
> From: Bagas Sanjaya <bagasdotme@...il.com>
> 
> Use bullet-list RST syntax for kernel-doc parameters' flags and
> interrupt mode descriptions. Otherwise Sphinx produces "Unexpected
> identation" errors and warnings.
> 
> Link: https://lore.kernel.org/r/20221121101245.23544-1-bagasdotme@gmail.com
> Fixes: 5c0997dc33ac24 ("PCI/MSI: Move pci_alloc_irq_vectors() to api.c")
> Fixes: 017239c8db2093 ("PCI/MSI: Move pci_irq_vector() to api.c")
> Fixes: be37b8428b7b77 ("PCI/MSI: Move pci_irq_get_affinity() to api.c")
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Signed-off-by: Bagas Sanjaya <bagasdotme@...il.com>
> [darwi@...utronix.de: Match subject-line with other subystem commits]
> [darwi@...utronix.de: Remove verbose Sphinx log from commit log]
> [darwi@...utronix.de: For C kernel-doc comments legibility, keep
>  the flags and interrupt mode descriptions aligned.]
> Acked-by: Ahmed S. Darwish <darwi@...utronix.de>
> ---
> 
>  drivers/pci/msi/api.c | 33 +++++++++++++++++++--------------
>  1 file changed, 19 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/pci/msi/api.c b/drivers/pci/msi/api.c
> index dfcaa77108de..6c0c0f3ad3b8 100644
> --- a/drivers/pci/msi/api.c
> +++ b/drivers/pci/msi/api.c
> @@ -209,12 +209,15 @@ EXPORT_SYMBOL(pci_disable_msix);
>   * @min_vecs: minimum required number of vectors (must be >= 1)
>   * @max_vecs: maximum desired number of vectors
>   * @flags:    One or more of:
> - *            %PCI_IRQ_MSIX      Allow trying MSI-X vector allocations
> - *            %PCI_IRQ_MSI       Allow trying MSI vector allocations
> - *            %PCI_IRQ_LEGACY    Allow trying legacy INTx interrupts, if
> - *                               and only if @min_vecs == 1
> - *            %PCI_IRQ_AFFINITY  Auto-manage IRQs affinity by spreading
> - *                               the vectors around available CPUs
> + *
> + *            * %PCI_IRQ_MSIX      Allow trying MSI-X vector allocations
> + *            * %PCI_IRQ_MSI       Allow trying MSI vector allocations
> + *
> + *            * %PCI_IRQ_LEGACY    Allow trying legacy INTx interrupts, if
> + *              and only if @min_vecs == 1
> + *
> + *            * %PCI_IRQ_AFFINITY  Auto-manage IRQs affinity by spreading
> + *              the vectors around available CPUs
>   *
>   * Allocate up to @max_vecs interrupt vectors on device. MSI-X irq
>   * vector allocation has a higher precedence over plain MSI, which has a
> @@ -299,10 +302,11 @@ EXPORT_SYMBOL(pci_alloc_irq_vectors_affinity);
>   * pci_irq_vector() - Get Linux IRQ number of a device interrupt vector
>   * @dev: the PCI device to operate on
>   * @nr:  device-relative interrupt vector index (0-based); has different
> - *       meanings, depending on interrupt mode
> - *         MSI-X        the index in the MSI-X vector table
> - *         MSI          the index of the enabled MSI vectors
> - *         INTx         must be 0
> + *       meanings, depending on interrupt mode:
> + *
> + *         * MSI-X     the index in the MSI-X vector table
> + *         * MSI       the index of the enabled MSI vectors
> + *         * INTx      must be 0
>   *
>   * Return: the Linux IRQ number, or -EINVAL if @nr is out of range
>   */
> @@ -322,10 +326,11 @@ EXPORT_SYMBOL(pci_irq_vector);
>   * pci_irq_get_affinity() - Get a device interrupt vector affinity
>   * @dev: the PCI device to operate on
>   * @nr:  device-relative interrupt vector index (0-based); has different
> - *       meanings, depending on interrupt mode
> - *         MSI-X        the index in the MSI-X vector table
> - *         MSI          the index of the enabled MSI vectors
> - *         INTx         must be 0
> + *       meanings, depending on interrupt mode:
> + *
> + *         * MSI-X     the index in the MSI-X vector table
> + *         * MSI       the index of the enabled MSI vectors
> + *         * INTx      must be 0
>   *
>   * Return: MSI/MSI-X vector affinity, NULL if @nr is out of range or if
>   * the MSI(-X) vector was allocated without explicit affinity

Personally I'd like to write the entries as:

  * term - definition

But anyway, your suggestion patch LGTM. Thanks!

Reviewed-by: Bagas Sanjaya <bagasdotme@...il.com>

-- 
An old man doll... just what I always wanted! - Clara

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ