DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anupam Kapoor <anupam.kapoor@gmail.com>
To: dev@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1
Date: Tue, 21 Jun 2016 17:13:22 +0530	[thread overview]
Message-ID: <CAEXHiZEDWcJr7kOc=Z+r0z0Z1uVLM6S-E5yPfSDkYhO0u0ruSw@mail.gmail.com> (raw)

This commit fixes build errors triggered due misleading indentation.

Fixes: 38db3f7f50bde (e1000: update base driver)
Fixes: 3fc5ca2f63529 (kni: initial import)


Signed-off-by: Anupam Kapoor <anupam.kapoor@gmail.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c     | 6 ++++--
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 3 ++-
 2 files changed, 6 insertions(+), 3 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..140a2a476ed2 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
@@ -3300,12 +3300,13 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw,
u32 address, u32 *data)
        *data = E1000_READ_REG(hw, E1000_MPHY_DATA);

        /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       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;
 }
@@ -3365,12 +3366,13 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw,
u32 address, u32 data,
        E1000_WRITE_REG(hw, E1000_MPHY_DATA, data);

        /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       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..c6f4130d78ab 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
@@ -867,12 +867,13 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
            link_mode == IXGBE_AUTOC_LMS_KX4_KX_KR_SGMII) {
                /* Set KX4/KX/KR support according to speed requested */
                autoc &= ~(IXGBE_AUTOC_KX4_KX_SUPP_MASK |
IXGBE_AUTOC_KR_SUPP);
-               if (speed & IXGBE_LINK_SPEED_10GB_FULL)
+               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 (speed & IXGBE_LINK_SPEED_1GB_FULL)
                        autoc |= IXGBE_AUTOC_KX_SUPP;
        } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) &&
-- 
2.9.0

​--
thanks
anupam​

             reply	other threads:[~2016-06-21 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 11:43 Anupam Kapoor [this message]
2016-06-21 12:27 ` Ferruh Yigit
2016-06-21 15:53   ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2016-06-21  8:37 Anupam Kapoor
2016-06-21 10:10 ` Ferruh Yigit
2016-06-21 11:20   ` Anupam Kapoor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEXHiZEDWcJr7kOc=Z+r0z0Z1uVLM6S-E5yPfSDkYhO0u0ruSw@mail.gmail.com' \
    --to=anupam.kapoor@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).