Skip to content

Commit e86c656

Browse files
mchehabJonathan Corbet
authored andcommitted
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>
1 parent 89b4223 commit e86c656

1 file changed

Lines changed: 5 additions & 35 deletions

File tree

‎include/linux/phy.h‎

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,8 @@ typedef enum {
147147
PHY_INTERFACE_MODE_MAX,
148148
} phy_interface_t;
149149

150-
/**
150+
/*
151151
* 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.
160152
*/
161153
unsigned int phy_supported_speeds(struct phy_device *phy,
162154
unsigned int *speeds,
@@ -1022,14 +1014,9 @@ static inline int __phy_modify_changed(struct phy_device *phydev, u32 regnum,
10221014
regnum, mask, set);
10231015
}
10241016

1025-
/**
1017+
/*
10261018
* phy_read_mmd - Convenience function for reading a register
10271019
* from an MMD on a given PHY.
1028-
* @phydev: The phy_device struct
1029-
* @devad: The MMD to read from
1030-
* @regnum: The register on the MMD to read
1031-
*
1032-
* Same rules as for phy_read();
10331020
*/
10341021
int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
10351022

@@ -1064,38 +1051,21 @@ int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
10641051
__ret; \
10651052
})
10661053

1067-
/**
1054+
/*
10681055
* __phy_read_mmd - Convenience function for reading a register
10691056
* from an MMD on a given PHY.
1070-
* @phydev: The phy_device struct
1071-
* @devad: The MMD to read from
1072-
* @regnum: The register on the MMD to read
1073-
*
1074-
* Same rules as for __phy_read();
10751057
*/
10761058
int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
10771059

1078-
/**
1060+
/*
10791061
* phy_write_mmd - Convenience function for writing a register
10801062
* on an MMD on a given PHY.
1081-
* @phydev: The phy_device struct
1082-
* @devad: The MMD to write to
1083-
* @regnum: The register on the MMD to read
1084-
* @val: value to write to @regnum
1085-
*
1086-
* Same rules as for phy_write();
10871063
*/
10881064
int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
10891065

1090-
/**
1066+
/*
10911067
* __phy_write_mmd - Convenience function for writing a register
10921068
* on an MMD on a given PHY.
1093-
* @phydev: The phy_device struct
1094-
* @devad: The MMD to write to
1095-
* @regnum: The register on the MMD to read
1096-
* @val: value to write to @regnum
1097-
*
1098-
* Same rules as for __phy_write();
10991069
*/
11001070
int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
11011071

0 commit comments

Comments
 (0)