forked from clearlinux-pkgs/linux-iot-lts2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0041-fix-some-likely-copy-paste-errors-with-some-if-blo.patch
50 lines (42 loc) · 1.52 KB
/
0041-fix-some-likely-copy-paste-errors-with-some-if-blo.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 5c016f6170a2d5538e1cfe03cbfc16a837857584 Mon Sep 17 00:00:00 2001
From: "Gross, Mark" <[email protected]>
Date: Fri, 14 Sep 2018 13:33:54 -0700
Subject: [PATCH 3/5] fix some likely copy paste errors with some if blocks
gcc 7.3 flagged some iffy if statements with python indentation needing
some brackets. this patch adds them.
Signed-off-by: mark gross<[email protected]>
---
drivers/staging/igb_avb/e1000_phy.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/igb_avb/e1000_phy.c b/drivers/staging/igb_avb/e1000_phy.c
index 0534e4a34af2..46ab8d5ae2ab 100644
--- a/drivers/staging/igb_avb/e1000_phy.c
+++ b/drivers/staging/igb_avb/e1000_phy.c
@@ -3291,12 +3291,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;
}
@@ -3356,12 +3357,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.19.1