From 84c22d7901f793bd267b5f79270080964b252826 Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Mon, 25 Sep 2006 16:39:22 -0700 Subject: [PATCH] [PATCH] Signedness issue in drivers/net/phy/phy_device.c 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 Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 2d1ecfd..ecd3da1 100644 --- a/drivers/net/phy/phy_device.c +++ b/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 -- 2.7.4