[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_30122FBA93E93911578208176E68AA00C807@qq.com>
Date: Mon, 17 Feb 2025 09:29:30 +0800
From: xiaopeitux@...mail.com
To: andrew+netdev@...n.ch,
maxime.chevallier@...tlin.com,
netdev@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org
Cc: Pei Xiao <xiaopei01@...inos.cn>,
kernel test robot <lkp@...el.com>
Subject: [PATCH V2] net: freescale: ucc_geth: make ugeth_mac_ops be static const
From: Pei Xiao <xiaopei01@...inos.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@...el.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@...inos.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
Powered by blists - more mailing lists