DORMANTno replies

[patch 08/11] Signedness issue in drivers/net/phy/phy_device.c

From: <hidden>
Date: 2006-09-25 23:39:29

From: Eric Sesterhenn <redacted>

While checking gcc 4.1 -Wextra warnings, I stumbled across the following
two warnings:

drivers/net/phy/phy_device.c:528: warning: comparison of unsigned expression < 0 is always false
drivers/net/phy/phy_device.c:546: warning: comparison of unsigned expression < 0 is always false

Since phy_read() returns an integer and can return negative values, it seems
to me the best way to get proper error handling working again is to make val
an int.  Currently it is an u32, so the < 0 check always fails.

Signed-off-by: Eric Sesterhenn <redacted>
Cc: Jeff Garzik <redacted>
Signed-off-by: Andrew Morton <redacted>
---

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

diff -puN drivers/net/phy/phy_device.c~signedness-issue-in-drivers-net-phy-phy_devicec drivers/net/phy/phy_device.c
--- a/drivers/net/phy/phy_device.c~signedness-issue-in-drivers-net-phy-phy_devicec
+++ a/drivers/net/phy/phy_device.c
@@ -522,7 +522,7 @@ EXPORT_SYMBOL(genphy_read_status);
 
 static int genphy_config_init(struct phy_device *phydev)
 {
-	u32 val;
+	int val;
 	u32 features;
 
 	/* For now, I'll claim that the generic driver supports
_
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help