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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 Dec 2021 00:33:45 +0900
From:   Akira Yokosawa <akiyks@...il.com>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>,
        Yanteng Si <siyanteng01@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>, chenhuacai@...nel.org,
        Jonathan Corbet <corbet@....net>,
        Heiner Kallweit <hkallweit1@...il.com>,
        linux-doc@...r.kernel.org, netdev@...r.kernel.org,
        Yanteng Si <siyanteng@...ngson.cn>
Subject: Re: [PATCH] net: phy: Remove unnecessary indentation in the comments
 of phy_device

Hi,
On Sun, 5 Dec 2021 13:45:42 +0000, Russell King wrote:
> On Sun, Dec 05, 2021 at 09:21:41PM +0800, Yanteng Si wrote:
>> Fix warning as:
>> 
>> linux-next/Documentation/networking/kapi:122: ./include/linux/phy.h:543: WARNING: Unexpected indentation.
>> linux-next/Documentation/networking/kapi:122: ./include/linux/phy.h:544: WARNING: Block quote ends without a blank line; unexpected unindent.
>> linux-next/Documentation/networking/kapi:122: ./include/linux/phy.h:546: WARNING: Unexpected indentation.
> 
> This seems to be at odds with the documentation in
> Documentation/doc-guide/kernel-doc.rst.
> 
> The warning refers to lines 543, 544 and 546.
> 
> 543: *              Bits [23:16] are currently reserved for future use.
> 544: *              Bits [31:24] are reserved for defining generic
> 545: *                           PHY driver behavior.
> 546: * @irq: IRQ number of the PHY's interrupt (-1 if none)
> 
> This doesn't look quite right with the warning messages above, because
> 544 doesn't unindent, and I've checked net-next, net, and mainline
> trees, and they're all the same.
> 
> So, I think we first need to establish exactly which lines you are
> seeing this warning for before anyone can make a suggestion.

Just a hint of kernel-doc comment format, which is not fully covered
in Documentation/doc-guide/kernel-doc.rst.

I think the diff below is what you'd like:

----8<-----
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 96e43fbb2dd8..1e180f3186d5 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -538,11 +538,12 @@ struct macsec_ops;
  * @mac_managed_pm: Set true if MAC driver takes of suspending/resuming PHY
  * @state: State of the PHY for management purposes
  * @dev_flags: Device-specific flags used by the PHY driver.
- *		Bits [15:0] are free to use by the PHY driver to communicate
- *			    driver specific behavior.
- *		Bits [23:16] are currently reserved for future use.
- *		Bits [31:24] are reserved for defining generic
- *			     PHY driver behavior.
+ *
+ *	 - Bits [15:0] are free to use by the PHY driver to communicate
+ *	   driver specific behavior.
+ *	 - Bits [23:16] are currently reserved for future use.
+ *	 - Bits [31:24] are reserved for defining generic
+ *	   PHY driver behavior.
  * @irq: IRQ number of the PHY's interrupt (-1 if none)
  * @phy_timer: The timer for handling the state machine
  * @phylink: Pointer to phylink instance for this PHY

base-commit: 065db2d90c6b8384c9072fe55f01c3eeda16c3c0
----8<-----

Using bullet lists for bit fields is a reasonable approach,
I guess.

For bullet lists in ReST, which kernel-doc is based on, see
https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#bullet-lists

Just my 2c.

BR, Akira

> 
> -- 
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ