svn commit: r275676 - head/sys/dev/mii

Ruslan Bukin br at FreeBSD.org
Wed Dec 10 11:35:11 UTC 2014


Author: br
Date: Wed Dec 10 11:35:10 2014
New Revision: 275676
URL: https://svnweb.freebsd.org/changeset/base/275676

Log:
  o Put () for p to avoid unexpected macro expansion
  o style(9) fix
  
  Submitted by:	Yonghyeon PYUN <pyunyh at gmail.com>

Modified:
  head/sys/dev/mii/micphy.c

Modified: head/sys/dev/mii/micphy.c
==============================================================================
--- head/sys/dev/mii/micphy.c	Wed Dec 10 11:21:52 2014	(r275675)
+++ head/sys/dev/mii/micphy.c	Wed Dec 10 11:35:10 2014	(r275676)
@@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$");
 #define	MII_KSZPHY_RX_DATA_PAD_SKEW		0x105
 #define	MII_KSZPHY_TX_DATA_PAD_SKEW		0x106
 
-#define	PS_TO_REG(p)	(p / 200)
+#define	PS_TO_REG(p)	((p) / 200)
 
 static int micphy_probe(device_t);
 static int micphy_attach(device_t);
@@ -104,7 +104,8 @@ static const struct mii_phy_funcs micphy
 	mii_phy_reset
 };
 
-static void micphy_write(struct mii_softc *sc, uint32_t reg, uint32_t val)
+static void
+micphy_write(struct mii_softc *sc, uint32_t reg, uint32_t val)
 {
 
 	PHY_WRITE(sc, MII_KSZPHY_EXTREG, KSZPHY_EXTREG_WRITE | reg);


More information about the svn-src-all mailing list