[dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1

Anupam Kapoor anupam.kapoor at gmail.com
Tue Jun 21 10:37:53 CEST 2016


This commit fixes build errors triggered due misleading indentation.

Fixes: 366113dbfb696 (e1000: suppress misleading indentation warning)


Signed-off-by: Anupam Kapoor <anupam.kapoor at gmail.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c     | 12 ++++++++----
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c |  6 +++---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
index df224702ed7d..26352da15101 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
@@ -3299,13 +3299,15 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data)
                return -E1000_ERR_PHY;
        *data = E1000_READ_REG(hw, E1000_MPHY_DATA);

-       /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       /* Disable access to mPHY if it was originally enabled */
+       if (locked) {
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
+
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
                                E1000_MPHY_DIS_ACCESS);
+       }

        return E1000_SUCCESS;
 }
@@ -3364,13 +3366,15 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 data,
                return -E1000_ERR_PHY;
        E1000_WRITE_REG(hw, E1000_MPHY_DATA, data);

-       /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       /* Disable access to mPHY if it was originally enabled */
+       if (locked) {
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
+
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
                                E1000_MPHY_DIS_ACCESS);
+       }

        return E1000_SUCCESS;
 }
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
index 017dfe16c73f..dc2a4fb61c25 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
@@ -870,9 +870,9 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
                if (speed & IXGBE_LINK_SPEED_10GB_FULL)
                        if (orig_autoc & IXGBE_AUTOC_KX4_SUPP)
                                autoc |= IXGBE_AUTOC_KX4_SUPP;
-                       if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
-                           (hw->phy.smart_speed_active == false))
-                               autoc |= IXGBE_AUTOC_KR_SUPP;
+               if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
+                   (hw->phy.smart_speed_active == false))
+                       autoc |= IXGBE_AUTOC_KR_SUPP;
                if (speed & IXGBE_LINK_SPEED_1GB_FULL)
                        autoc |= IXGBE_AUTOC_KX_SUPP;
        } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) &&
--
2.9.0



More information about the dev mailing list