Re: [PATCH v3 14/32] net: phy: remove kernel-doc duplication

Andrew Lunn
2020-10-27T12:42:00Z

On Tue, Oct 27, 2020 at 10:51:18AM +0100, Mauro Carvalho Chehab wrote:
> Sphinx 3 now checks for duplicated function declarations:
>
> .../Documentation/networking/kapi:143: ../include/linux/phy.h:163: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
> Declaration is 'unsigned int phy_supported_speeds (struct phy_device *phy, unsigned int *speeds, unsigned int size)'.
> .../Documentation/networking/kapi:143: ../include/linux/phy.h:1034: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
> Declaration is 'int phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
> .../Documentation/networking/kapi:143: ../include/linux/phy.h:1076: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
> Declaration is 'int __phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
> .../Documentation/networking/kapi:143: ../include/linux/phy.h:1088: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
> Declaration is 'int phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
> .../Documentation/networking/kapi:143: ../include/linux/phy.h:1100: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
> Declaration is 'int __phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
>
> It turns that both the C and the H files have the same
> kernel-doc markup for the same functions. Let's drop the
> at the header file, keeping the one closer to the code.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Andrew