svn commit: r359193 - stable/12/sys/dev/usb/net

Ed Maste emaste at FreeBSD.org
Sat Mar 21 00:34:29 UTC 2020


Author: emaste
Date: Sat Mar 21 00:34:28 2020
New Revision: 359193
URL: https://svnweb.freebsd.org/changeset/base/359193

Log:
  MFC r359070: if_muge: use C99 bool for boolean vars

Modified:
  stable/12/sys/dev/usb/net/if_muge.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/usb/net/if_muge.c
==============================================================================
--- stable/12/sys/dev/usb/net/if_muge.c	Sat Mar 21 00:32:43 2020	(r359192)
+++ stable/12/sys/dev/usb/net/if_muge.c	Sat Mar 21 00:34:28 2020	(r359193)
@@ -389,9 +389,10 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
 {
 	usb_ticks_t start_ticks;
 	const usb_ticks_t max_ticks = USB_MS_TO_TICKS(1000);
-	int err, locked;
+	int err;
 	uint32_t val, saved;
 	uint16_t i;
+	bool locked;
 
 	locked = mtx_owned(&sc->sc_mtx); /* XXX */
 	if (!locked)
@@ -483,9 +484,10 @@ static int
 lan78xx_otp_read_raw(struct muge_softc *sc, uint16_t off, uint8_t *buf,
     uint16_t buflen)
 {
-	int locked, err;
+	int err;
 	uint32_t val;
 	uint16_t i;
+	bool locked;
 	locked = mtx_owned(&sc->sc_mtx);
 	if (!locked)
 		MUGE_LOCK(sc);
@@ -659,8 +661,8 @@ static int
 lan78xx_miibus_readreg(device_t dev, int phy, int reg)
 {
 	struct muge_softc *sc = device_get_softc(dev);
-	int locked;
 	uint32_t addr, val;
+	bool locked;
 
 	val = 0;
 	locked = mtx_owned(&sc->sc_mtx);
@@ -712,8 +714,8 @@ static int
 lan78xx_miibus_writereg(device_t dev, int phy, int reg, int val)
 {
 	struct muge_softc *sc = device_get_softc(dev);
-	int locked;
 	uint32_t addr;
+	bool locked;
 
 	if (sc->sc_phyno != phy)
 		return (0);
@@ -760,10 +762,10 @@ lan78xx_miibus_statchg(device_t dev)
 	struct muge_softc *sc = device_get_softc(dev);
 	struct mii_data *mii = uether_getmii(&sc->sc_ue);
 	struct ifnet *ifp;
-	int locked;
 	int err;
 	uint32_t flow = 0;
 	uint32_t fct_flow = 0;
+	bool locked;
 
 	locked = mtx_owned(&sc->sc_mtx);
 	if (!locked)


More information about the svn-src-all mailing list