net: use bool values to pass bool param of phy_init_eee()
authorJisheng Zhang <jszhang@kernel.org>
Sun, 23 Jan 2022 15:22:41 +0000 (23:22 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Jan 2022 01:09:56 +0000 (17:09 -0800)
The 2nd param of phy_init_eee(): clk_stop_enable is a bool param, use
true or false instead of 1/0.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220123152241.1480-1-jszhang@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/mt7530.c
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/freescale/fec_main.c
drivers/net/ethernet/marvell/mvneta.c
drivers/net/ethernet/microchip/lan743x_ethtool.c
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c

index 3867f3d4545fc7db31d70bff5e7987221dc5fdc8..a3b98992f18037eeee81a6155ef9f858de1de2d3 100644 (file)
@@ -2186,7 +2186,7 @@ int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
 {
        int ret;
 
-       ret = phy_init_eee(phy, 0);
+       ret = phy_init_eee(phy, false);
        if (ret)
                return 0;
 
index b82512e5b33b081b5233f4a3e02f5971bdbed342..bc77a26c825a7d9dd9f0ef4e42333c92d7795568 100644 (file)
@@ -2846,7 +2846,7 @@ static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
                        mcr |= PMCR_RX_FC_EN;
        }
 
-       if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, 0) >= 0) {
+       if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
                switch (speed) {
                case SPEED_1000:
                        mcr |= PMCR_FORCE_EEE1G;
index 87f1056e29ff234bac5e3fbf37c7b55e7d0b4349..cfe09117fe6c40a9fbd7064313dc48aae53864cc 100644 (file)
@@ -1368,7 +1368,7 @@ static int bcmgenet_set_eee(struct net_device *dev, struct ethtool_eee *e)
        if (!p->eee_enabled) {
                bcmgenet_eee_enable_set(dev, false);
        } else {
-               ret = phy_init_eee(dev->phydev, 0);
+               ret = phy_init_eee(dev->phydev, false);
                if (ret) {
                        netif_err(priv, hw, dev, "EEE initialization failed\n");
                        return ret;
index 796133de527e43a31da25fa72e97db7509084d3d..11227f51404cf6483320fd34d5dd525ce34e9387 100644 (file)
@@ -2797,7 +2797,7 @@ static int fec_enet_eee_mode_set(struct net_device *ndev, bool enable)
        int ret = 0;
 
        if (enable) {
-               ret = phy_init_eee(ndev->phydev, 0);
+               ret = phy_init_eee(ndev->phydev, false);
                if (ret)
                        return ret;
 
index 309bd3e97ea00c7017a1f8fdf97592db17a86cbd..57c708b55685017b94bf33efdfa96eab4311b92d 100644 (file)
@@ -4212,7 +4212,7 @@ static void mvneta_mac_link_up(struct phylink_config *config,
        mvneta_port_up(pp);
 
        if (phy && pp->eee_enabled) {
-               pp->eee_active = phy_init_eee(phy, 0) >= 0;
+               pp->eee_active = phy_init_eee(phy, false) >= 0;
                mvneta_set_eee(pp, pp->eee_active && pp->tx_lpi_enabled);
        }
 }
index 91a755efe2e6b7d0c889f903fafcbc3419443743..5f1e7b8bad4f75be41e9a35df48c161a1c823565 100644 (file)
@@ -750,7 +750,7 @@ static int lan743x_ethtool_set_eee(struct net_device *netdev,
        }
 
        if (eee->eee_enabled) {
-               ret = phy_init_eee(phydev, 0);
+               ret = phy_init_eee(phydev, false);
                if (ret) {
                        netif_err(adapter, drv, adapter->netdev,
                                  "EEE initialization failed\n");
index 32161a56726c1af89df1c538dec5b4cc318fcac4..77a0d9d7e65aeefa62f3ef94e9c4c4c9d208769d 100644 (file)
@@ -127,7 +127,7 @@ bool sxgbe_eee_init(struct sxgbe_priv_data * const priv)
        /* MAC core supports the EEE feature. */
        if (priv->hw_cap.eee) {
                /* Check if the PHY supports EEE */
-               if (phy_init_eee(ndev->phydev, 1))
+               if (phy_init_eee(ndev->phydev, true))
                        return false;
 
                priv->eee_active = 1;