diff --git a/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt7531.c b/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt7531.c old mode 100755 new mode 100644 diff --git a/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt753x_mdio.c b/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt753x_mdio.c index c57a5a24b6..a29aea3617 100644 --- a/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt753x_mdio.c +++ b/target/linux/mediatek/files-5.4/drivers/net/phy/mtk/mt753x/mt753x_mdio.c @@ -249,8 +249,8 @@ static void mt753x_load_port_cfg(struct gsw_mt753x *gsw) struct device_node *port_np; struct device_node *fixed_link_node; struct mt753x_port_cfg *port_cfg; + phy_interface_t phy_mode; u32 port; - int ret; for_each_child_of_node(gsw->dev->of_node, port_np) { if (!of_device_is_compatible(port_np, "mediatek,mt753x-port")) @@ -281,11 +281,12 @@ static void mt753x_load_port_cfg(struct gsw_mt753x *gsw) port_cfg->np = port_np; - ret = of_get_phy_mode(port_cfg->np); - if (ret < 0) { + phy_mode = of_get_phy_mode(port_cfg->np); + if ((int)phy_mode < 0) { dev_info(gsw->dev, "incorrect phy-mode %d\n", port); continue; } + port_cfg->phy_mode = phy_mode; fixed_link_node = of_get_child_by_name(port_np, "fixed-link"); if (fixed_link_node) { @@ -578,7 +579,6 @@ static void mt753x_connect_internal_phys(struct gsw_mt753x *gsw, struct device_node *phy_np; struct mt753x_phy *phy; phy_interface_t iface; - int ret; u32 phyad; if (!mii_np) @@ -591,8 +591,8 @@ static void mt753x_connect_internal_phys(struct gsw_mt753x *gsw, if (phyad >= MT753X_NUM_PHYS) continue; - ret = of_get_phy_mode(phy_np); - if (ret < 0) { + iface = of_get_phy_mode(phy_np); + if ((int)iface < 0) { dev_info(gsw->dev, "incorrect phy-mode %d for PHY %d\n", iface, phyad); continue;