]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: of_mdio: use int type for address variable
authorDaniel Mack <zonque@gmail.com>
Mon, 2 Jun 2014 11:32:45 +0000 (13:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Jun 2014 17:43:07 +0000 (10:43 -0700)
Use int rather than u32 to fix the following warning:

drivers/of/of_mdio.c:147 of_mdiobus_register() warn: unsigned 'addr' is
never less than zero.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Fixes: 8f8382888cba ("net: of_mdio: factor out code to parse a phy's 'reg' property")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/of/of_mdio.c

index 2fe922bfade8c04cd2bcae91a0fb8960ace41cf0..8478c97f920164c8f5bda48d75d555842f6c611b 100644 (file)
@@ -121,9 +121,8 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
 {
        struct device_node *child;
        const __be32 *paddr;
-       u32 addr;
        bool scanphys = false;
-       int rc, i;
+       int addr, rc, i;
 
        /* Mask out all PHYs from auto probing.  Instead the PHYs listed in
         * the device tree are populated after the bus has been registered */