Skip to content

Commit

Permalink
net: of_mdio: use int type for address variable
Browse files Browse the repository at this point in the history
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: 8f83828 ("net: of_mdio: factor out code to parse a phy's 'reg' property")
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Mack authored and David S. Miller committed Jun 2, 2014
1 parent c7bfbe5 commit 4cd984b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/of/of_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 4cd984b

Please sign in to comment.