Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: remove kernel-doc duplication

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>
Link: https://lore.kernel.org/r/75e9a357f9a716833d2094b04898754876365e68.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
e86c6569 89b42235

+5 -35
+5 -35
include/linux/phy.h
··· 147 147 PHY_INTERFACE_MODE_MAX, 148 148 } phy_interface_t; 149 149 150 - /** 150 + /* 151 151 * phy_supported_speeds - return all speeds currently supported by a PHY device 152 - * @phy: The PHY device to return supported speeds of. 153 - * @speeds: buffer to store supported speeds in. 154 - * @size: size of speeds buffer. 155 - * 156 - * Description: Returns the number of supported speeds, and fills 157 - * the speeds buffer with the supported speeds. If speeds buffer is 158 - * too small to contain all currently supported speeds, will return as 159 - * many speeds as can fit. 160 152 */ 161 153 unsigned int phy_supported_speeds(struct phy_device *phy, 162 154 unsigned int *speeds, ··· 1014 1022 regnum, mask, set); 1015 1023 } 1016 1024 1017 - /** 1025 + /* 1018 1026 * phy_read_mmd - Convenience function for reading a register 1019 1027 * from an MMD on a given PHY. 1020 - * @phydev: The phy_device struct 1021 - * @devad: The MMD to read from 1022 - * @regnum: The register on the MMD to read 1023 - * 1024 - * Same rules as for phy_read(); 1025 1028 */ 1026 1029 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); 1027 1030 ··· 1051 1064 __ret; \ 1052 1065 }) 1053 1066 1054 - /** 1067 + /* 1055 1068 * __phy_read_mmd - Convenience function for reading a register 1056 1069 * from an MMD on a given PHY. 1057 - * @phydev: The phy_device struct 1058 - * @devad: The MMD to read from 1059 - * @regnum: The register on the MMD to read 1060 - * 1061 - * Same rules as for __phy_read(); 1062 1070 */ 1063 1071 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); 1064 1072 1065 - /** 1073 + /* 1066 1074 * phy_write_mmd - Convenience function for writing a register 1067 1075 * on an MMD on a given PHY. 1068 - * @phydev: The phy_device struct 1069 - * @devad: The MMD to write to 1070 - * @regnum: The register on the MMD to read 1071 - * @val: value to write to @regnum 1072 - * 1073 - * Same rules as for phy_write(); 1074 1076 */ 1075 1077 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val); 1076 1078 1077 - /** 1079 + /* 1078 1080 * __phy_write_mmd - Convenience function for writing a register 1079 1081 * on an MMD on a given PHY. 1080 - * @phydev: The phy_device struct 1081 - * @devad: The MMD to write to 1082 - * @regnum: The register on the MMD to read 1083 - * @val: value to write to @regnum 1084 - * 1085 - * Same rules as for __phy_write(); 1086 1082 */ 1087 1083 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val); 1088 1084