diff options
| author | Conor Dooley <conor.dooley@microchip.com> | 2026-03-31 16:10:21 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-02 06:15:19 +0300 |
| commit | cee10a01e286e88e0949979e91231270ca9fdb8e (patch) | |
| tree | 3ae6106f6022243bbe8904309628f98f1fe68971 | |
| parent | a77fb1ace44ed11874b9bf064208cad5fc0d94a5 (diff) | |
| download | linux-cee10a01e286e88e0949979e91231270ca9fdb8e.tar.xz | |
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>
| -rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 7a48ebe0741f..7f061d7c95af 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4949,6 +4949,13 @@ static int macb_init(struct platform_device *pdev, return macb_init_dflt(pdev); } +static const struct macb_usrio_config at91_default_usrio = { + .mii = MACB_BIT(MII), + .rmii = MACB_BIT(RMII), + .rgmii = GEM_BIT(RGMII), + .clken = MACB_BIT(CLKEN), +}; + #if defined(CONFIG_OF) /* 1518 rounded up */ #define AT91ETHER_MAX_RBUFF_SZ 0x600 @@ -5523,13 +5530,6 @@ static int eyeq5_init(struct platform_device *pdev) return ret; } -static const struct macb_usrio_config at91_default_usrio = { - .mii = MACB_BIT(MII), - .rmii = MACB_BIT(RMII), - .rgmii = GEM_BIT(RGMII), - .clken = MACB_BIT(CLKEN), -}; - static const struct macb_usrio_config mpfs_usrio = { .tsu_source = 0, }; |
