Skip to contentSkip to conversation

net: phy: ar8327: fix ar8327n_reg_read

PATCH Applied Oleksij Rempel 2 participants 2 messages Jan 30, 2018 – Feb 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: ar8327: fix ar8327n_reg_read

Actual read value was lost and only by accident worked properly.

---
 drivers/net/phy/ar8327.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/ar8327.c +1 -1
index a0b10021d..e9ac3d49e 100644
@@ -83,7 +83,7 @@ static u32 ar8327n_reg_read(struct phy_device *phydev, u32 reg_addr)
 	reg_word_addr++;
 	phy_addr = 0x10 | ((reg_word_addr >> 5) & 0x7); /* bit7-5 of reg address */
 	phy_reg = (u8) (reg_word_addr & 0x1f);   /* bit4-0 of reg address */
-	reg_val = (u32) mdiobus_read(phydev->bus, phy_addr, phy_reg);
+	tmp_val = (u32) mdiobus_read(phydev->bus, phy_addr, phy_reg);
 	reg_val |= (tmp_val << 16);
 
 	return reg_val;
Signature · 7 lines
2.14.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 6 lines · Oleksij Rempel

Actual read value was lost and only by accident worked properly.

---
 drivers/net/phy/ar8327.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

Quoted 23 lines
drivers/net/phy/ar8327.c +1 -1
index a0b10021d..e9ac3d49e 100644
@@ -83,7 +83,7 @@ static u32 ar8327n_reg_read(struct phy_device *phydev, u32 reg_addr)
 	reg_word_addr++;
 	phy_addr = 0x10 | ((reg_word_addr >> 5) & 0x7); /* bit7-5 of reg address */
 	phy_reg = (u8) (reg_word_addr & 0x1f);   /* bit4-0 of reg address */
-	reg_val = (u32) mdiobus_read(phydev->bus, phy_addr, phy_reg);
+	tmp_val = (u32) mdiobus_read(phydev->bus, phy_addr, phy_reg);
 	reg_val |= (tmp_val << 16);
 
 	return reg_val;
Signature · 7 lines
2.14.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox