• E
    [PATCH] Signedness issue in drivers/net/phy/phy_device.c · 84c22d79
    Eric Sesterhenn 提交于
    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: NEric Sesterhenn <snakebyte@gmx.de>
    Cc: Jeff Garzik <jeff@garzik.org>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NJeff Garzik <jeff@garzik.org>
    84c22d79
phy_device.c 15.6 KB