net: enetc: add missing static descriptor and inline keyword
Subsystems (5)
Wei Fang
maintainerPATCH 1/1 net: enetc: add missing static descriptor and inline keyword
Fix the build warnings when CONFIG_FSL_ENETC_MDIO is not enabled. The detailed warnings are shown as follows.
include/linux/fsl/enetc_mdio.h:62:18: warning: no previous prototype for function 'enetc_hw_alloc' [-Wmissing-prototypes]
62 | struct enetc_hw *enetc_hw_alloc(struct device *dev, void __iomem *port_regs)
| ^include/linux/fsl/enetc_mdio.h:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
62 | struct enetc_hw *enetc_hw_alloc(struct device *dev, void __iomem *port_regs)
| ^
| static8 warnings generated.
--- include/linux/fsl/enetc_mdio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/fsl/enetc_mdio.h +2 -1
@@ -59,7 +59,8 @@ static inline int enetc_mdio_read_c45(struct mii_bus *bus, int phy_id,static inline int enetc_mdio_write_c45 (struct mii_bus *bus,int phy_id,int devad,int regnum,u16 value) {return -EINVAL ; } -struct enetc_hw *enetc_hw_alloc (struct device *dev,void __iomem *port_regs) +static inline struct enetc_hw *enetc_hw_alloc (struct device *dev, +void __iomem *port_regs) {return ERR_PTR (-EINVAL ); }#endif
Signature · 1 line
2.34.1
Quoted 3 lines
-----Original Message-----
From: Wei Fang <[email protected]>
Sent: Friday, October 11, 2024 6:01 AM
[...]
Quoted 15 lines
Subject: [PATCH net] net: enetc: add missing static descriptor and inline keyword
Fix the build warnings when
CONFIG_FSL_ENETC_MDIOis not enabled. The detailed warnings are shown as follows.
include/linux/fsl/enetc_mdio.h:62:18: warning: no previous prototype for function 'enetc_hw_alloc' [-Wmissing-prototypes]
62 | structenetc_hw*enetc_hw_alloc(struct device *dev, void__iomem*port_regs)
| ^include/linux/fsl/enetc_mdio.h:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
62 | structenetc_hw*enetc_hw_alloc(struct device *dev, void__iomem*port_regs)
Quoted 6 lines
| ^ | static8 warnings generated.
Fixes 6517798dd343 ("enetc: Make MDIO accessors more generic and exportto
include/linux/fsl")
Quoted 10 lines · Wei Fang
Fix the build warnings when
CONFIG_FSL_ENETC_MDIOis not enabled. The detailed warnings are shown as follows.
include/linux/fsl/enetc_mdio.h:62:18: warning: no previous prototype for function 'enetc_hw_alloc' [-Wmissing-prototypes]
62 | structenetc_hw*enetc_hw_alloc(struct device *dev, void__iomem*port_regs)
| ^include/linux/fsl/enetc_mdio.h:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit62 | struct enetc_hw *enetc_hw_alloc(struct device *dev, void __iomem *port_regs) | ^ | static
Quoted 8 lines
8 warnings generated.
Fixes 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")Reported-by kernel test robot <[email protected]>Signed-off-by Wei Fang <[email protected]>---
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 7 lines · On Fri, 11 Oct 2024 11:01:03 +0800 you wrote:
Fix the build warnings when
CONFIG_FSL_ENETC_MDIOis not enabled. The detailed warnings are shown as follows.
include/linux/fsl/enetc_mdio.h:62:18: warning: no previous prototype for function 'enetc_hw_alloc' [-Wmissing-prototypes]
62 | structenetc_hw*enetc_hw_alloc(struct device *dev, void__iomem*port_regs)
| ^include/linux/fsl/enetc_mdio.h:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
Quoted 6 lines
62 | struct enetc_hw *enetc_hw_alloc(struct device *dev, void __iomem *port_regs) | ^ | static8 warnings generated.
[...]
Here is the summary with links:
- [net] net: enetc: add missing static descriptor and inline keyword
https://git.kernel.org/netdev/net/c/1d7b2ce43d2c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html