dpdk/0103-e1000-base-Add-missing-braces-to-the-if-statements.patch
Nirmoy Das 77f1f98e47 Accepting request 404208 from home:markoschandras:network-fixes
- Add upstream patches to fix building with gcc >= 6
  * 0100-kni-fix-build-with-gcc-6.patch
  * 0101-ixgbe-fix-uninitialized-warning.patch
  * 0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch
  * 0103-e1000-base-Add-missing-braces-to-the-if-statements.patch
  * 0104-igb-fix-constant-sign-in-left-shift-operator.patch
  * 0105-e1000-fix-missing-link-interrupt-check-brackets.patch
  * 0106-app-test-fix-missing-brackets.patch
  * 0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch

OBS-URL: https://build.opensuse.org/request/show/404208
OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=9
2016-06-23 10:41:55 +00:00

73 lines
2.2 KiB
Diff

From 67f1325574e0acc45f277b5bcb88bb1653c32f37 Mon Sep 17 00:00:00 2001
From: Markos Chandras <mchandras@suse.de>
Date: Wed, 22 Jun 2016 23:32:29 +0100
Subject: [PATCH] e1000/base: Add missing braces to the 'if' statements
Add the missing braces to the 'if' statements to fix the misleading
identation. This also fixes the following build errors when building
with gcc >= 6:
drivers/net/e1000/base/e1000_phy.c:4156:2:
error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (locked)
^~
drivers/net/e1000/base/e1000_phy.c:4158:3:
note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (!ready)
^~
drivers/net/e1000/base/e1000_phy.c: In function 'e1000_write_phy_reg_mphy':
drivers/net/e1000/base/e1000_phy.c:4221:2:
error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (locked)
^~
drivers/net/e1000/base/e1000_phy.c:4223:3:
note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (!ready)
^~
Signed-off-by: Markos Chandras <mchandras@suse.de>
---
drivers/net/e1000/base/e1000_phy.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index d43b7ce..33f478b 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -4153,12 +4153,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;
}
@@ -4218,12 +4219,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;
}
--
2.8.4