common/cmd_mdio.c: fix compile warning
authorAnatolij Gustschin <agust@denx.de>
Sat, 30 Apr 2011 02:39:29 +0000 (02:39 +0000)
committerWolfgang Denk <wd@denx.de>
Sat, 30 Apr 2011 21:09:48 +0000 (23:09 +0200)
cmd_mdio.c: In function 'mdio_read_ranges':
cmd_mdio.c:97: warning: comparison is always false due to limited range of data type

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Andy Fleming <afleming@freescale.com>
common/cmd_mdio.c

index cac070308969662e2794acbfbe3606f44af23e49..4ac9de4acf27112b870a26ae5962365b0d786ac9 100644 (file)
@@ -91,9 +91,9 @@ int mdio_read_ranges(struct mii_dev *bus, int addrlo,
 
                for (devad = devadlo; devad <= devadhi; devad++) {
                        for (reg = reglo; reg <= reghi; reg++) {
-                               u16 val;
-                               val = bus->read(bus, addr, devad, reg);
+                               int val;
 
+                               val = bus->read(bus, addr, devad, reg);
                                if (val < 0) {
                                        printf("Error\n");