Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: macb: fix use of at91_default_usrio without CONFIG_OF

If CONFIG_OF is not enabled, at91_default_usrio is used undeclared in
gem_default_config. Move at91_default_usrio back above the CONFIG_OF
section where macb_default_usrio used to be, so that it is unconditionally
defined and defined prior to any of the users.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603280028.wQjUrIvv-lkp@intel.com/
Reported-by: Jiawen Wu <jiawenwu@trustnetic.com>
Closes: https://lore.kernel.org/all/06a701dcc014$86def5b0$949ce110$@trustnetic.com/
Fixes: a17871778ee28 ("net: macb: rename macb_default_usrio to at91_default_usrio as not all platforms have mii mode control in usrio")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260331-enroll-sensation-50901318a419@spud
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Conor Dooley and committed by
Jakub Kicinski
cee10a01 a77fb1ac

+7 -7
+7 -7
drivers/net/ethernet/cadence/macb_main.c
··· 4949 4949 return macb_init_dflt(pdev); 4950 4950 } 4951 4951 4952 + static const struct macb_usrio_config at91_default_usrio = { 4953 + .mii = MACB_BIT(MII), 4954 + .rmii = MACB_BIT(RMII), 4955 + .rgmii = GEM_BIT(RGMII), 4956 + .clken = MACB_BIT(CLKEN), 4957 + }; 4958 + 4952 4959 #if defined(CONFIG_OF) 4953 4960 /* 1518 rounded up */ 4954 4961 #define AT91ETHER_MAX_RBUFF_SZ 0x600 ··· 5529 5522 phy_exit(bp->phy); 5530 5523 return ret; 5531 5524 } 5532 - 5533 - static const struct macb_usrio_config at91_default_usrio = { 5534 - .mii = MACB_BIT(MII), 5535 - .rmii = MACB_BIT(RMII), 5536 - .rgmii = GEM_BIT(RGMII), 5537 - .clken = MACB_BIT(CLKEN), 5538 - }; 5539 5525 5540 5526 static const struct macb_usrio_config mpfs_usrio = { 5541 5527 .tsu_source = 0,