From: Pei Xiao Date: Mon, 17 Feb 2025 01:29:30 +0000 (+0800) Subject: net: freescale: ucc_geth: make ugeth_mac_ops be static const X-Git-Tag: v6.15-rc1~160^2~286 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9faaaef27c5df617223ad725f3fac9a21d333e81;p=thirdparty%2Flinux.git net: freescale: ucc_geth: make ugeth_mac_ops be static const 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 Closes: https://lore.kernel.org/202502141128.9HfxcdIE-lkp@intel.com Signed-off-by: Pei Xiao Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 88510f8227596..affd5a6c44e7b 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,