]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: stmmac: dwmac-socfpga: Use the correct type for interface modes
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Tue, 24 Mar 2026 09:20:58 +0000 (10:20 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Mar 2026 01:19:42 +0000 (18:19 -0700)
The internal helper socfpga_get_plat_phymode() returns an int where we
actually return a PHY_INTERFACE_MODE_xxx, use the correct type for this.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20260324092102.687082-4-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c

index ed6448c0ad2a58e125e59892c12a7a3b3c7c9240..629074dbbc156c1178287a3d37e0b2325a72fb26 100644 (file)
@@ -72,7 +72,7 @@ struct socfpga_dwmac {
        const struct socfpga_dwmac_ops *ops;
 };
 
-static int socfpga_get_plat_phymode(struct socfpga_dwmac *dwmac)
+static phy_interface_t socfpga_get_plat_phymode(struct socfpga_dwmac *dwmac)
 {
        return dwmac->plat_dat->phy_interface;
 }
@@ -386,7 +386,7 @@ static int smtg_crosststamp(ktime_t *device, struct system_counterval_t *system,
 static int socfpga_gen5_set_phy_mode(struct socfpga_dwmac *dwmac)
 {
        struct regmap *sys_mgr_base_addr = dwmac->sys_mgr_base_addr;
-       int phymode = socfpga_get_plat_phymode(dwmac);
+       phy_interface_t phymode = socfpga_get_plat_phymode(dwmac);
        u32 reg_offset = dwmac->reg_offset;
        u32 reg_shift = dwmac->reg_shift;
        u32 ctrl, val, module;
@@ -444,7 +444,7 @@ static int socfpga_gen5_set_phy_mode(struct socfpga_dwmac *dwmac)
 static int socfpga_gen10_set_phy_mode(struct socfpga_dwmac *dwmac)
 {
        struct regmap *sys_mgr_base_addr = dwmac->sys_mgr_base_addr;
-       int phymode = socfpga_get_plat_phymode(dwmac);
+       phy_interface_t phymode = socfpga_get_plat_phymode(dwmac);
        u32 reg_offset = dwmac->reg_offset;
        u32 reg_shift = dwmac->reg_shift;
        u32 ctrl, val, module;