Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544605

[PATCH net 1/3] net: phy: fix sign type error in genphy_config_eee_advert

From Jerome Brunet <jbrunet@baylibre.com>
Newsgroups linux.kernel
Subject [PATCH net 1/3] net: phy: fix sign type error in genphy_config_eee_advert
Date 2016-12-19 16:10 +0100
Message-ID <sQ7JG-16N-89@gated-at.bofh.it> (permalink)
References <sQ7JE-16N-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In genphy_config_eee_advert, the return value of phy_read_mmd_indirect is
checked to know if the register could be accessed but the result is
assigned to a 'u32'.
Changing to 'int' to correctly get errors from phy_read_mmd_indirect.

Fixes: d853d145ea3e ("net: phy: add an option to disable EEE advertisement")
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/net/phy/phy_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 9c06f8028f0c..ee5ebadb1463 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1187,8 +1187,8 @@ static int genphy_config_advert(struct phy_device *phydev)
  */
 static int genphy_config_eee_advert(struct phy_device *phydev)
 {
-	u32 broken = phydev->eee_broken_modes;
-	u32 old_adv, adv;
+	int broken = phydev->eee_broken_modes;
+	int old_adv, adv;
 
 	/* Nothing to disable */
 	if (!broken)
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net 0/3] Fix integration of eee-broken-modes Jerome Brunet <jbrunet@baylibre.com> - 2016-12-19 16:10 +0100
  [PATCH net 2/3] net: phy: use boolean dt properties for eee broken modes Jerome Brunet <jbrunet@baylibre.com> - 2016-12-19 16:10 +0100
  [PATCH net 1/3] net: phy: fix sign type error in genphy_config_eee_advert Jerome Brunet <jbrunet@baylibre.com> - 2016-12-19 16:10 +0100
  [PATCH net 3/3] dt: bindings: net: use boolean dt properties for eee broken modes Jerome Brunet <jbrunet@baylibre.com> - 2016-12-19 16:10 +0100
  Re: [PATCH net 0/3] Fix integration of eee-broken-modes David Miller <davem@davemloft.net> - 2016-12-20 20:00 +0100

csiph-web