linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] net: freescale: ucc_geth: make ugeth_mac_ops be static const
@ 2025-02-17  1:29 xiaopeitux
  2025-02-19  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: xiaopeitux @ 2025-02-17  1:29 UTC (permalink / raw)
  To: andrew+netdev, maxime.chevallier, netdev, linuxppc-dev,
	linux-kernel
  Cc: Pei Xiao, kernel test robot

From: Pei Xiao <xiaopei01@kylinos.cn>

sparse warning:
    sparse: symbol 'ugeth_mac_ops' was not declared. Should it be
static.

Add static to fix sparse warnings and add const. phylink_create() will
accept a const struct.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502141128.9HfxcdIE-lkp@intel.com/
Fixes: 53036aa8d031 ("net: freescale: ucc_geth: phylink conversion")
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>

changlog:
V2:change to add 'const' suggestion from Andrew Lunn's review.
---
 drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index f47f8177a93b..ed4f57701485 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3408,7 +3408,7 @@ static int ucc_geth_parse_clock(struct device_node *np, const char *which,
 	return 0;
 }
 
-struct phylink_mac_ops ugeth_mac_ops = {
+static const struct phylink_mac_ops ugeth_mac_ops = {
 	.mac_link_up = ugeth_mac_link_up,
 	.mac_link_down = ugeth_mac_link_down,
 	.mac_config = ugeth_mac_config,
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] net: freescale: ucc_geth: make ugeth_mac_ops be static const
  2025-02-17  1:29 [PATCH V2] net: freescale: ucc_geth: make ugeth_mac_ops be static const xiaopeitux
@ 2025-02-19  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-19  2:20 UTC (permalink / raw)
  To: None
  Cc: andrew+netdev, maxime.chevallier, netdev, linuxppc-dev,
	linux-kernel, xiaopei01, lkp

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 17 Feb 2025 09:29:30 +0800 you wrote:
> From: Pei Xiao <xiaopei01@kylinos.cn>
> 
> sparse warning:
>     sparse: symbol 'ugeth_mac_ops' was not declared. Should it be
> static.
> 
> Add static to fix sparse warnings and add const. phylink_create() will
> accept a const struct.
> 
> [...]

Here is the summary with links:
  - [V2] net: freescale: ucc_geth: make ugeth_mac_ops be static const
    https://git.kernel.org/netdev/net-next/c/9faaaef27c5d

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] 2+ messages in thread

end of thread, other threads:[~2025-02-19  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17  1:29 [PATCH V2] net: freescale: ucc_geth: make ugeth_mac_ops be static const xiaopeitux
2025-02-19  2:20 ` 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).