Message ID | tencent_30122FBA93E93911578208176E68AA00C807@qq.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 9faaaef27c5df617223ad725f3fac9a21d333e81 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [V2] net: freescale: ucc_geth: make ugeth_mac_ops be static const | expand |
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!
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,