summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWenpeng Liang <liangwenpeng@huawei.com>2021-06-16 13:01:23 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-16 22:34:07 +0300
commit169d7a402dfae45e916e9c847f089482d65ddc4f (patch)
tree1827a6d62214def8f076cef5e16c64f826c1f333 /drivers
parent3bdee6a8e92e9f3403d3e290f4a16189ecc713c5 (diff)
downloadlinux-169d7a402dfae45e916e9c847f089482d65ddc4f.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/fixed_phy.c4
-rw-r--r--drivers/net/phy/phy.c3
-rw-r--r--drivers/net/phy/phy_device.c9
-rw-r--r--drivers/net/phy/phylink.c5
4 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 18d81f43f2a8..c65fb5f5d2dc 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -161,8 +161,8 @@ static int fixed_phy_add_gpiod(unsigned int irq, int phy_addr,
}
int fixed_phy_add(unsigned int irq, int phy_addr,
- struct fixed_phy_status *status) {
-
+ struct fixed_phy_status *status)
+{
return fixed_phy_add_gpiod(irq, phy_addr, status, NULL);
}
EXPORT_SYMBOL_GPL(fixed_phy_add);
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 1089a93d12f6..8eeb26d8aeb7 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -380,8 +380,7 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)
else if (val & BMCR_SPEED100)
phydev->speed = SPEED_100;
else phydev->speed = SPEED_10;
- }
- else {
+ } else {
if (phydev->autoneg == AUTONEG_DISABLE)
change_autoneg = true;
phydev->autoneg = AUTONEG_ENABLE;
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 85734309b580..5d5f9a9ee768 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -3021,15 +3021,14 @@ static int phy_probe(struct device *dev)
* a controller will attach, and may modify one
* or both of these values
*/
- if (phydrv->features) {
+ if (phydrv->features)
linkmode_copy(phydev->supported, phydrv->features);
- } else if (phydrv->get_features) {
+ else if (phydrv->get_features)
err = phydrv->get_features(phydev);
- } else if (phydev->is_c45) {
+ else if (phydev->is_c45)
err = genphy_c45_pma_read_abilities(phydev);
- } else {
+ else
err = genphy_read_abilities(phydev);
- }
if (err)
goto out;
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 35f22a936857..eb29ef53d971 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -1383,11 +1383,10 @@ int phylink_ethtool_ksettings_get(struct phylink *pl,
ASSERT_RTNL();
- if (pl->phydev) {
+ if (pl->phydev)
phy_ethtool_ksettings_get(pl->phydev, kset);
- } else {
+ else
kset->base.port = pl->link_port;
- }
linkmode_copy(kset->link_modes.supported, pl->supported);