net: stmmac: reduce indentation by adding a continue

As suggested by Joe Perches, replacing the "if phydev" logic permit to
reduce indentation in the for loop.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
LABBE Corentin 2017-02-15 10:46:44 +01:00 committed by David S. Miller
parent 9beae261ba
commit cc26dc67b6

View File

@ -247,20 +247,20 @@ int stmmac_mdio_register(struct net_device *ndev)
found = 0; found = 0;
for (addr = 0; addr < PHY_MAX_ADDR; addr++) { for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
struct phy_device *phydev = mdiobus_get_phy(new_bus, addr); struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
if (phydev) {
int act = 0; int act = 0;
char irq_num[4]; char irq_num[4];
char *irq_str; char *irq_str;
if (!phydev)
continue;
/* /*
* If an IRQ was provided to be assigned after * If an IRQ was provided to be assigned after
* the bus probe, do it here. * the bus probe, do it here.
*/ */
if (!mdio_bus_data->irqs && if (!mdio_bus_data->irqs &&
(mdio_bus_data->probed_phy_irq > 0)) { (mdio_bus_data->probed_phy_irq > 0)) {
new_bus->irq[addr] = new_bus->irq[addr] = mdio_bus_data->probed_phy_irq;
mdio_bus_data->probed_phy_irq;
phydev->irq = mdio_bus_data->probed_phy_irq; phydev->irq = mdio_bus_data->probed_phy_irq;
} }
@ -286,12 +286,10 @@ int stmmac_mdio_register(struct net_device *ndev)
break; break;
} }
netdev_info(ndev, "PHY ID %08x at %d IRQ %s (%s)%s\n", netdev_info(ndev, "PHY ID %08x at %d IRQ %s (%s)%s\n",
phydev->phy_id, addr, phydev->phy_id, addr, irq_str, phydev_name(phydev),
irq_str, phydev_name(phydev),
act ? " active" : ""); act ? " active" : "");
found = 1; found = 1;
} }
}
if (!found && !mdio_node) { if (!found && !mdio_node) {
netdev_warn(ndev, "No PHY found\n"); netdev_warn(ndev, "No PHY found\n");