net: mscc: ocelot: Fix dumplicated argument in ocelot
authorWan Jiabing <wanjiabing@vivo.com>
Mon, 11 Oct 2021 02:27:41 +0000 (10:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Oct 2021 10:21:55 +0000 (11:21 +0100)
Fix the following coccicheck warning:
drivers/net/ethernet/mscc/ocelot.c:474:duplicated argument to & or |
drivers/net/ethernet/mscc/ocelot.c:476:duplicated argument to & or |
drivers/net/ethernet/mscc/ocelot_net.c:1627:duplicated argument
to & or |

These DEV_CLOCK_CFG_MAC_TX_RST are duplicate here.
Here should be DEV_CLOCK_CFG_MAC_RX_RST.

Fixes: e6e12df625f2 ("net: mscc: ocelot: convert to phylink")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot_net.c

index 559177e6ded40754b138d0bc1e5fe425972a737c..4de58321907cebfd3f02213c51f492d8db760a8a 100644 (file)
@@ -472,9 +472,9 @@ void ocelot_phylink_mac_link_down(struct ocelot *ocelot, int port,
            !(quirks & OCELOT_QUIRK_QSGMII_PORTS_MUST_BE_UP))
                ocelot_port_rmwl(ocelot_port,
                                 DEV_CLOCK_CFG_MAC_TX_RST |
-                                DEV_CLOCK_CFG_MAC_TX_RST,
+                                DEV_CLOCK_CFG_MAC_RX_RST,
                                 DEV_CLOCK_CFG_MAC_TX_RST |
-                                DEV_CLOCK_CFG_MAC_TX_RST,
+                                DEV_CLOCK_CFG_MAC_RX_RST,
                                 DEV_CLOCK_CFG);
 }
 EXPORT_SYMBOL_GPL(ocelot_phylink_mac_link_down);
index e54b9fb2a97a60f0653a5a1c425e58780913462f..2a85bcb5d0c24236dfda4298c16beab4d1b445fa 100644 (file)
@@ -1625,7 +1625,7 @@ static int ocelot_port_phylink_create(struct ocelot *ocelot, int port,
        if (phy_mode == PHY_INTERFACE_MODE_QSGMII)
                ocelot_port_rmwl(ocelot_port, 0,
                                 DEV_CLOCK_CFG_MAC_TX_RST |
-                                DEV_CLOCK_CFG_MAC_TX_RST,
+                                DEV_CLOCK_CFG_MAC_RX_RST,
                                 DEV_CLOCK_CFG);
 
        ocelot_port->phy_mode = phy_mode;