aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/bcm87xx.c
diff options
context:
space:
mode:
authorWenpeng Liang <liangwenpeng@huawei.com>2021-06-16 18:01:19 +0800
committerDavid S. Miller <davem@davemloft.net>2021-06-16 12:34:07 -0700
commit775f25479df924611fc482a602d147a43ac93702 (patch)
tree4fe073b8cbb419d833db63696177631bcfaa0d85 /drivers/net/phy/bcm87xx.c
parentnet: qualcomm: rmnet: Remove some unneeded casts (diff)
downloadlinux-dev-775f25479df924611fc482a602d147a43ac93702.tar.xz
linux-dev-775f25479df924611fc482a602d147a43ac93702.zip
net: phy: change format of some declarations
Add a blank line after declarations, change the order of them and put the assignments and declarations together. Cc: Richard Cochran <richardcochran@gmail.com> 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/net/phy/bcm87xx.c')
-rw-r--r--drivers/net/phy/bcm87xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/bcm87xx.c b/drivers/net/phy/bcm87xx.c
index 4ac8fd190e9d..313563482690 100644
--- a/drivers/net/phy/bcm87xx.c
+++ b/drivers/net/phy/bcm87xx.c
@@ -54,9 +54,9 @@ static int bcm87xx_of_reg_init(struct phy_device *phydev)
u16 reg = be32_to_cpup(paddr++);
u16 mask = be32_to_cpup(paddr++);
u16 val_bits = be32_to_cpup(paddr++);
- int val;
u32 regnum = mdiobus_c45_addr(devid, reg);
- val = 0;
+ int val = 0;
+
if (mask) {
val = phy_read(phydev, regnum);
if (val < 0) {