* [PATCH net] net: enetc: add missing static descriptor and inline keyword
@ 2024-10-11 3:01 Wei Fang
2024-10-11 7:12 ` Claudiu Manoil
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Wei Fang @ 2024-10-11 3:01 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, claudiu.manoil, vladimir.oltean,
christophe.leroy
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, netdev, imx
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)
| ^
| static
8 warnings generated.
Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410102136.jQHZOcS4-lkp@intel.com/
Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
include/linux/fsl/enetc_mdio.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/fsl/enetc_mdio.h b/include/linux/fsl/enetc_mdio.h
index df25fffdc0ae..623ccfcbf39c 100644
--- a/include/linux/fsl/enetc_mdio.h
+++ b/include/linux/fsl/enetc_mdio.h
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH net] net: enetc: add missing static descriptor and inline keyword
2024-10-11 3:01 [PATCH net] net: enetc: add missing static descriptor and inline keyword Wei Fang
@ 2024-10-11 7:12 ` Claudiu Manoil
2024-10-11 14:44 ` Vladimir Oltean
2024-10-11 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Claudiu Manoil @ 2024-10-11 7:12 UTC (permalink / raw)
To: Wei Fang, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, Vladimir Oltean,
christophe.leroy@csgroup.eu
Cc: linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
imx@lists.linux.dev
> -----Original Message-----
> From: Wei Fang <wei.fang@nxp.com>
> Sent: Friday, October 11, 2024 6:01 AM
[...]
> Subject: [PATCH net] 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)
> | ^
> | static
> 8 warnings generated.
>
> Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export
> to include/linux/fsl")
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: enetc: add missing static descriptor and inline keyword
2024-10-11 3:01 [PATCH net] net: enetc: add missing static descriptor and inline keyword Wei Fang
2024-10-11 7:12 ` Claudiu Manoil
@ 2024-10-11 14:44 ` Vladimir Oltean
2024-10-11 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2024-10-11 14:44 UTC (permalink / raw)
To: Wei Fang
Cc: davem, edumazet, kuba, pabeni, claudiu.manoil, christophe.leroy,
linuxppc-dev, linux-arm-kernel, linux-kernel, netdev, imx
On Fri, Oct 11, 2024 at 11:01:03AM +0800, Wei Fang wrote:
> 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)
> | ^
> | static
> 8 warnings generated.
>
> Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
> Cc: stable@vger.kernel.org
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202410102136.jQHZOcS4-lkp@intel.com/
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> ---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: enetc: add missing static descriptor and inline keyword
2024-10-11 3:01 [PATCH net] net: enetc: add missing static descriptor and inline keyword Wei Fang
2024-10-11 7:12 ` Claudiu Manoil
2024-10-11 14:44 ` Vladimir Oltean
@ 2024-10-11 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-11 23:10 UTC (permalink / raw)
To: Wei Fang
Cc: davem, edumazet, kuba, pabeni, claudiu.manoil, vladimir.oltean,
christophe.leroy, linuxppc-dev, linux-arm-kernel, linux-kernel,
netdev, imx
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 11 Oct 2024 11:01:03 +0800 you wrote:
> 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)
> | ^
> | static
> 8 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-11 23:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-11 3:01 [PATCH net] net: enetc: add missing static descriptor and inline keyword Wei Fang
2024-10-11 7:12 ` Claudiu Manoil
2024-10-11 14:44 ` Vladimir Oltean
2024-10-11 23:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).