+ signedness-issue-in-drivers-net-phy-phy_devicec.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Signedness issue in drivers/net/phy/phy_device.c

has been added to the -mm tree.  Its filename is

     signedness-issue-in-drivers-net-phy-phy_devicec.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Signedness issue in drivers/net/phy/phy_device.c
From: Eric Sesterhenn <snakebyte@xxxxxx>

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 <snakebyte@xxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/net/phy/phy_device.c |    2 +-
 1 files 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
_

Patches currently in -mm which might be from snakebyte@xxxxxx are

git-gfs2.patch
signedness-issue-in-drivers-net-phy-phy_devicec.patch
signedness-issue-in-drivers-net-3c515c.patch
signedness-issue-in-drivers-scsi-iprc.patch
signedness-issue-in-drivers-scsi-osstc.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux