[U-Boot] [PATCH 47/51] ihs_mdio: Fix style violations

Mario Six mario.six at gdsys.cc
Fri Jul 14 12:55:33 UTC 2017


Fix some style violations in the ihs_mdio driver, and make the code more
readable where possible.

Signed-off-by: Mario Six <mario.six at gdsys.cc>
---

 board/gdsys/common/ihs_mdio.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/board/gdsys/common/ihs_mdio.c b/board/gdsys/common/ihs_mdio.c
index 85a804d5cd..4e3bcd406f 100644
--- a/board/gdsys/common/ihs_mdio.c
+++ b/board/gdsys/common/ihs_mdio.c
@@ -38,7 +38,7 @@ static int ihs_mdio_reset(struct mii_dev *bus)
 }
 
 static int ihs_mdio_address(struct ihs_mdio_info *info, int addr, int dev_addr,
-			 int regnum)
+			    int regnum)
 {
 	FPGA_SET_REG(info->fpga, mdio.address_data, regnum);
 	FPGA_SET_REG(info->fpga, mdio.control,
@@ -61,7 +61,9 @@ static int ihs_mdio_read(struct mii_dev *bus, int addr, int dev_addr,
 	}
 
 	FPGA_SET_REG(info->fpga, mdio.control,
-		     ((addr & 0x1f) << 5) | ((info->clause45 ? dev_addr : regnum) & 0x1f) | (2 << 10));
+		     ((addr & 0x1f) << 5) |
+		      ((info->clause45 ? dev_addr : regnum) & 0x1f) |
+		      (2 << 10));
 
 	/* wait for rx data available */
 	udelay(100);
@@ -85,7 +87,9 @@ static int ihs_mdio_write(struct mii_dev *bus, int addr, int dev_addr,
 
 	FPGA_SET_REG(info->fpga, mdio.address_data, value);
 	FPGA_SET_REG(info->fpga, mdio.control,
-		     ((addr & 0x1f) << 5) | ((info->clause45 ? dev_addr : regnum) & 0x1f) | (1 << 10));
+		     ((addr & 0x1f) << 5) |
+		      ((info->clause45 ? dev_addr : regnum) & 0x1f) |
+		      (1 << 10));
 
 	return 0;
 }
-- 
2.11.0



More information about the U-Boot mailing list