Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: fix formatting issues with braces

Fix following format issues:
1. open brace '{' following function definitions should go to the next
line.
2. braces {} are not necessary for single line statements.
3. else should follow close brace '}'.

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Wenpeng Liang and committed by
David S. Miller
169d7a40 3bdee6a8

+9 -12
+2 -2
drivers/net/phy/fixed_phy.c
··· 161 161 } 162 162 163 163 int fixed_phy_add(unsigned int irq, int phy_addr, 164 - struct fixed_phy_status *status) { 165 - 164 + struct fixed_phy_status *status) 165 + { 166 166 return fixed_phy_add_gpiod(irq, phy_addr, status, NULL); 167 167 } 168 168 EXPORT_SYMBOL_GPL(fixed_phy_add);
+1 -2
drivers/net/phy/phy.c
··· 380 380 else if (val & BMCR_SPEED100) 381 381 phydev->speed = SPEED_100; 382 382 else phydev->speed = SPEED_10; 383 - } 384 - else { 383 + } else { 385 384 if (phydev->autoneg == AUTONEG_DISABLE) 386 385 change_autoneg = true; 387 386 phydev->autoneg = AUTONEG_ENABLE;
+4 -5
drivers/net/phy/phy_device.c
··· 3021 3021 * a controller will attach, and may modify one 3022 3022 * or both of these values 3023 3023 */ 3024 - if (phydrv->features) { 3024 + if (phydrv->features) 3025 3025 linkmode_copy(phydev->supported, phydrv->features); 3026 - } else if (phydrv->get_features) { 3026 + else if (phydrv->get_features) 3027 3027 err = phydrv->get_features(phydev); 3028 - } else if (phydev->is_c45) { 3028 + else if (phydev->is_c45) 3029 3029 err = genphy_c45_pma_read_abilities(phydev); 3030 - } else { 3030 + else 3031 3031 err = genphy_read_abilities(phydev); 3032 - } 3033 3032 3034 3033 if (err) 3035 3034 goto out;
+2 -3
drivers/net/phy/phylink.c
··· 1383 1383 1384 1384 ASSERT_RTNL(); 1385 1385 1386 - if (pl->phydev) { 1386 + if (pl->phydev) 1387 1387 phy_ethtool_ksettings_get(pl->phydev, kset); 1388 - } else { 1388 + else 1389 1389 kset->base.port = pl->link_port; 1390 - } 1391 1390 1392 1391 linkmode_copy(kset->link_modes.supported, pl->supported); 1393 1392