PERFORCE change 166471 for review

Oleksandr Tymoshenko gonzo at FreeBSD.org
Thu Jul 23 20:25:56 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=166471

Change 166471 by gonzo at gonzo_figaro on 2009/07/23 20:25:52

	- Hide unused variables under #ifdef

Affected files ...

.. //depot/projects/avr32/src/sys/dev/ate/if_ate.c#4 edit
.. //depot/projects/avr32/src/sys/dev/uart/uart_dev_atmel.c#8 edit

Differences ...

==== //depot/projects/avr32/src/sys/dev/ate/if_ate.c#4 (text) ====

@@ -880,10 +880,13 @@
 	struct ate_softc *sc = xsc;
 	struct ifnet *ifp = sc->ifp;
 	struct mbuf *mb;
-	void *bp;
-	uint32_t status, reg, rx_stat, frame_len;
+	uint32_t status, rx_stat, frame_len;
 	int frame_start;
 	int i;
+#ifndef ATE_EMACB
+	uint32_t reg;
+	void *bp;
+#endif
 
 
 	status = RD4(sc, ETH_ISR);
@@ -1127,8 +1130,11 @@
 {
 	struct ate_softc *sc = ifp->if_softc;
 	struct mbuf *m, *mdefrag;
+	int e;
+#ifndef ATE_EMACB
+	int nseg;
 	bus_dma_segment_t segs[1];
-	int nseg, e;
+#endif
 
 	ATE_ASSERT_LOCKED(sc);
 	if (ifp->if_drv_flags & IFF_DRV_OACTIVE)
@@ -1450,7 +1456,7 @@
 	return (val);
 }
 
-static void
+static int
 ate_miibus_writereg(device_t dev, int phy, int reg, int data)
 {
 	struct ate_softc *sc;
@@ -1464,7 +1470,8 @@
 	WR4(sc, ETH_MAN, ETH_MAN_REG_WR(phy, reg, data));
 	while ((RD4(sc, ETH_SR) & ETH_SR_IDLE) == 0)
 		continue;
-	return;
+
+	return (0);
 }
 
 static device_method_t ate_methods[] = {

==== //depot/projects/avr32/src/sys/dev/uart/uart_dev_atmel.c#8 (text+ko) ====

@@ -333,7 +333,9 @@
 #endif
 	uint32_t cr;
 	struct uart_atmel_softc *atsc;
+#if 0
         struct uart_devinfo *di;
+#endif
 
 	atsc = (struct uart_atmel_softc *)sc;
 


More information about the p4-projects mailing list