Module Name:    src
Committed By:   christos
Date:           Thu Oct 17 21:06:15 UTC 2013

Modified Files:
        src/sys/dev/pci: if_dge.c if_ipw.c if_iwi.c if_iwn.c if_jme.c ld_twa.c
            mly.c mpii.c pccbb.c twa.c viomb.c weasel_pci.c

Log Message:
- remove unused variables
- move debugging code inside debugging sections


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/if_dge.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/pci/if_ipw.c
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/pci/if_iwi.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/if_iwn.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/if_jme.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/ld_twa.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/mly.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/mpii.c
cvs rdiff -u -r1.204 -r1.205 src/sys/dev/pci/pccbb.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/twa.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/viomb.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/weasel_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_dge.c
diff -u src/sys/dev/pci/if_dge.c:1.35 src/sys/dev/pci/if_dge.c:1.36
--- src/sys/dev/pci/if_dge.c:1.35	Sat Oct 27 13:18:32 2012
+++ src/sys/dev/pci/if_dge.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_dge.c,v 1.35 2012/10/27 17:18:32 chs Exp $ */
+/*	$NetBSD: if_dge.c,v 1.36 2013/10/17 21:06:15 christos Exp $ */
 
 /*
  * Copyright (c) 2004, SUNET, Swedish University Computer Network.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.35 2012/10/27 17:18:32 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.36 2013/10/17 21:06:15 christos Exp $");
 
 
 
@@ -473,7 +473,7 @@ struct rxbugentry {
 static int
 dge_alloc_rcvmem(struct dge_softc *sc)
 {
-	char *ptr, *kva;
+	char *kva;
 	bus_dma_segment_t seg;
 	int i, rseg, state, error;
 	struct rxbugentry *entry;
@@ -519,7 +519,6 @@ dge_alloc_rcvmem(struct dge_softc *sc)
 	 * Now divide it up into DGE_BUFFER_SIZE pieces and save the addresses
 	 * in an array.
 	 */
-	ptr = sc->sc_bugbuf;
 	if ((entry = malloc(sizeof(*entry) * DGE_NBUFFERS,
 	    M_DEVBUF, M_NOWAIT)) == NULL) {
 		error = ENOBUFS;

Index: src/sys/dev/pci/if_ipw.c
diff -u src/sys/dev/pci/if_ipw.c:1.54 src/sys/dev/pci/if_ipw.c:1.55
--- src/sys/dev/pci/if_ipw.c:1.54	Sat Oct 27 13:18:32 2012
+++ src/sys/dev/pci/if_ipw.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ipw.c,v 1.54 2012/10/27 17:18:32 chs Exp $	*/
+/*	$NetBSD: if_ipw.c,v 1.55 2013/10/17 21:06:15 christos Exp $	*/
 /*	FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp 	*/
 
 /*-
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.54 2012/10/27 17:18:32 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.55 2013/10/17 21:06:15 christos Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -886,16 +886,17 @@ ipw_read_prom_word(struct ipw_softc *sc,
 static void
 ipw_command_intr(struct ipw_softc *sc, struct ipw_soft_buf *sbuf)
 {
-	struct ipw_cmd *cmd;
 
 	bus_dmamap_sync(sc->sc_dmat, sbuf->map, 0, sizeof (struct ipw_cmd),
 	    BUS_DMASYNC_POSTREAD);
 
-	cmd = mtod(sbuf->m, struct ipw_cmd *);
+#ifdef IPW_DEBUG
+	struct ipw_cmd *cmd = mtod(sbuf->m, struct ipw_cmd *);
 
 	DPRINTFN(2, ("cmd ack'ed (%u, %u, %u, %u, %u)\n", le32toh(cmd->type),
 	    le32toh(cmd->subtype), le32toh(cmd->seq), le32toh(cmd->len),
 	    le32toh(cmd->status)));
+#endif
 
 	wakeup(&sc->cmd);
 }
@@ -1152,7 +1153,6 @@ ipw_rx_intr(struct ipw_softc *sc)
 static void
 ipw_release_sbd(struct ipw_softc *sc, struct ipw_soft_bd *sbd)
 {
-	struct ieee80211com *ic;
 	struct ipw_soft_hdr *shdr;
 	struct ipw_soft_buf *sbuf;
 
@@ -1171,7 +1171,6 @@ ipw_release_sbd(struct ipw_softc *sc, st
 		break;
 
 	case IPW_SBD_TYPE_DATA:
-		ic = &sc->sc_ic;
 		sbuf = sbd->priv;
 
 		bus_dmamap_sync(sc->sc_dmat, sbuf->map,

Index: src/sys/dev/pci/if_iwi.c
diff -u src/sys/dev/pci/if_iwi.c:1.92 src/sys/dev/pci/if_iwi.c:1.93
--- src/sys/dev/pci/if_iwi.c:1.92	Fri Mar 29 23:21:05 2013
+++ src/sys/dev/pci/if_iwi.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwi.c,v 1.92 2013/03/30 03:21:05 christos Exp $  */
+/*	$NetBSD: if_iwi.c,v 1.93 2013/10/17 21:06:15 christos Exp $  */
 /*	$OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $	*/
 
 /*-
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.92 2013/03/30 03:21:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.93 2013/10/17 21:06:15 christos Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -1233,25 +1233,29 @@ static void
 iwi_notification_intr(struct iwi_softc *sc, struct iwi_notif *notif)
 {
 	struct ieee80211com *ic = &sc->sc_ic;
-	struct iwi_notif_scan_channel *chan;
-	struct iwi_notif_scan_complete *scan;
 	struct iwi_notif_authentication *auth;
 	struct iwi_notif_association *assoc;
 	struct iwi_notif_beacon_state *beacon;
 
 	switch (notif->type) {
 	case IWI_NOTIF_TYPE_SCAN_CHANNEL:
-		chan = (struct iwi_notif_scan_channel *)(notif + 1);
+#ifdef IWI_DEBUG
+		struct iwi_notif_scan_channel *chan =
+		    (struct iwi_notif_scan_channel *)(notif + 1);
 
 		DPRINTFN(2, ("Scan of channel %u complete (%u)\n",
 		    ic->ic_channels[chan->nchan].ic_freq, chan->nchan));
+#endif
 		break;
 
 	case IWI_NOTIF_TYPE_SCAN_COMPLETE:
-		scan = (struct iwi_notif_scan_complete *)(notif + 1);
+#ifdef IWI_DEBUG
+		struct iwi_notif_scan_complete *scan =
+		    (struct iwi_notif_scan_complete *)(notif + 1);
 
 		DPRINTFN(2, ("Scan completed (%u, %u)\n", scan->nchan,
 		    scan->status));
+#endif
 
 		/* monitor mode uses scan to set the channel ... */
 		if (ic->ic_opmode != IEEE80211_M_MONITOR) {
@@ -1333,9 +1337,8 @@ iwi_notification_intr(struct iwi_softc *
 static void
 iwi_cmd_intr(struct iwi_softc *sc)
 {
-	uint32_t hw;
 
-	hw = CSR_READ_4(sc, IWI_CSR_CMD_RIDX);
+	(void)CSR_READ_4(sc, IWI_CSR_CMD_RIDX);
 
 	bus_dmamap_sync(sc->sc_dmat, sc->cmdq.desc_map,
 	    sc->cmdq.next * IWI_CMD_DESC_SIZE, IWI_CMD_DESC_SIZE,

Index: src/sys/dev/pci/if_iwn.c
diff -u src/sys/dev/pci/if_iwn.c:1.69 src/sys/dev/pci/if_iwn.c:1.70
--- src/sys/dev/pci/if_iwn.c:1.69	Sat Sep 14 09:11:31 2013
+++ src/sys/dev/pci/if_iwn.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwn.c,v 1.69 2013/09/14 13:11:31 joerg Exp $	*/
+/*	$NetBSD: if_iwn.c,v 1.70 2013/10/17 21:06:15 christos Exp $	*/
 /*	$OpenBSD: if_iwn.c,v 1.119 2013/05/29 23:16:52 yuo Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  * adapters.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.69 2013/09/14 13:11:31 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.70 2013/10/17 21:06:15 christos Exp $");
 
 #define IWN_USE_RBUF	/* Use local storage for RX */
 #undef IWN_HWCRYPTO	/* XXX does not even compile yet */
@@ -3115,7 +3115,6 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd,
 {
 	struct iwn_softc *sc = ifp->if_softc;
 	struct ieee80211com *ic = &sc->sc_ic;
-	struct ifaddr *ifa;
 	const struct sockaddr *sa;
 	int s, error = 0;
 
@@ -3123,9 +3122,9 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd,
 
 	switch (cmd) {
 	case SIOCSIFADDR:
-		ifa = (struct ifaddr *)data;
 		ifp->if_flags |= IFF_UP;
 #ifdef INET
+		struct ifaddr *ifa = (struct ifaddr *)data;
 		if (ifa->ifa_addr->sa_family == AF_INET)
 			arp_ifinit(&ic->ic_ac, ifa);
 #endif

Index: src/sys/dev/pci/if_jme.c
diff -u src/sys/dev/pci/if_jme.c:1.22 src/sys/dev/pci/if_jme.c:1.23
--- src/sys/dev/pci/if_jme.c:1.22	Fri Mar 29 23:21:05 2013
+++ src/sys/dev/pci/if_jme.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_jme.c,v 1.22 2013/03/30 03:21:05 christos Exp $	*/
+/*	$NetBSD: if_jme.c,v 1.23 2013/10/17 21:06:15 christos Exp $	*/
 
 /*
  * Copyright (c) 2008 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.22 2013/03/30 03:21:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.23 2013/10/17 21:06:15 christos Exp $");
 
 
 #include <sys/param.h>
@@ -1345,7 +1345,6 @@ jme_ifioctl(struct ifnet *ifp, unsigned 
 static int
 jme_encap(struct jme_softc *sc, struct mbuf **m_head)
 {
-	struct jme_desc *txd;
 	struct jme_desc *desc;
 	struct mbuf *m;
 	struct m_tag *mtag;
@@ -1446,7 +1445,6 @@ jme_encap(struct jme_softc *sc, struct m
 	}
 
 	prod = sc->jme_tx_prod;
-	txd = &sc->jme_txring[prod];
 
 	error = bus_dmamap_load_mbuf(sc->jme_dmatag, sc->jme_txmbufm[prod],
 	    *m_head, BUS_DMA_NOWAIT | BUS_DMA_WRITE);

Index: src/sys/dev/pci/ld_twa.c
diff -u src/sys/dev/pci/ld_twa.c:1.15 src/sys/dev/pci/ld_twa.c:1.16
--- src/sys/dev/pci/ld_twa.c:1.15	Thu Feb  2 14:43:06 2012
+++ src/sys/dev/pci/ld_twa.c	Thu Oct 17 17:06:15 2013
@@ -1,5 +1,5 @@
 /*	$wasabi: ld_twa.c,v 1.9 2006/02/14 18:44:37 jordanr Exp $	*/
-/*	$NetBSD: ld_twa.c,v 1.15 2012/02/02 19:43:06 tls Exp $ */
+/*	$NetBSD: ld_twa.c,v 1.16 2013/10/17 21:06:15 christos Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_twa.c,v 1.15 2012/02/02 19:43:06 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_twa.c,v 1.16 2013/10/17 21:06:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -200,11 +200,9 @@ ld_twa_handler(struct twa_request *tr)
 	uint8_t	status;
 	struct buf *bp;
 	struct ld_twa_softc *sc;
-	struct twa_softc *twa;
 
 	bp = tr->bp;
 	sc = (struct ld_twa_softc *)tr->tr_ld_sc;
-	twa = device_private(device_parent(sc->sc_ld.sc_dv));
 
 	status = tr->tr_command->command.cmd_pkt_9k.status;
 

Index: src/sys/dev/pci/mly.c
diff -u src/sys/dev/pci/mly.c:1.45 src/sys/dev/pci/mly.c:1.46
--- src/sys/dev/pci/mly.c:1.45	Sat Oct 27 13:18:35 2012
+++ src/sys/dev/pci/mly.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mly.c,v 1.45 2012/10/27 17:18:35 chs Exp $	*/
+/*	$NetBSD: mly.c,v 1.46 2013/10/17 21:06:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mly.c,v 1.45 2012/10/27 17:18:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mly.c,v 1.46 2013/10/17 21:06:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2081,7 +2081,7 @@ mly_scsipi_ioctl(struct scsipi_channel *
 static int
 mly_fwhandshake(struct mly_softc *mly)
 {
-	u_int8_t error, param0, param1;
+	u_int8_t error;
 	int spinup;
 
 	spinup = 0;
@@ -2107,8 +2107,8 @@ mly_fwhandshake(struct mly_softc *mly)
 			continue;
 
 		error = mly_inb(mly, mly->mly_error_status) & ~MLY_MSG_EMPTY;
-		param0 = mly_inb(mly, mly->mly_cmd_mailbox);
-		param1 = mly_inb(mly, mly->mly_cmd_mailbox + 1);
+		(void)mly_inb(mly, mly->mly_cmd_mailbox);
+		(void)mly_inb(mly, mly->mly_cmd_mailbox + 1);
 
 		switch (error) {
 		case MLY_MSG_SPINUP:

Index: src/sys/dev/pci/mpii.c
diff -u src/sys/dev/pci/mpii.c:1.3 src/sys/dev/pci/mpii.c:1.4
--- src/sys/dev/pci/mpii.c:1.3	Fri Aug  9 15:51:29 2013
+++ src/sys/dev/pci/mpii.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.3 2013/08/09 19:51:29 kardel Exp $ */
+/* $NetBSD: mpii.c,v 1.4 2013/10/17 21:06:15 christos Exp $ */
 /*	OpenBSD: mpii.c,v 1.51 2012/04/11 13:29:14 naddy Exp 	*/
 /*
  * Copyright (c) 2010 Mike Belopuhov <m...@crypt.org.ru>
@@ -20,7 +20,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.3 2013/08/09 19:51:29 kardel Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.4 2013/10/17 21:06:15 christos Exp $");
 
 #include "bio.h"
 
@@ -3258,7 +3258,6 @@ static int
 mpii_portenable(struct mpii_softc *sc)
 {
 	struct mpii_msg_portenable_request	*peq;
-	struct mpii_msg_portenable_repy		*pep;
 	struct mpii_ccb				*ccb;
 
 	DNPRINTF(MPII_D_MISC, "%s: mpii_portenable\n", DEVNAME(sc));
@@ -3287,7 +3286,6 @@ mpii_portenable(struct mpii_softc *sc)
 		    DEVNAME(sc));
 		return (1);
 	}
-	pep = ccb->ccb_rcb->rcb_reply;
 
 	mpii_push_reply(sc, ccb->ccb_rcb);
 	mpii_put_ccb(sc, ccb);

Index: src/sys/dev/pci/pccbb.c
diff -u src/sys/dev/pci/pccbb.c:1.204 src/sys/dev/pci/pccbb.c:1.205
--- src/sys/dev/pci/pccbb.c:1.204	Mon Jan 30 14:41:22 2012
+++ src/sys/dev/pci/pccbb.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pccbb.c,v 1.204 2012/01/30 19:41:22 drochner Exp $	*/
+/*	$NetBSD: pccbb.c,v 1.205 2013/10/17 21:06:15 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 1999 and 2000
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.204 2012/01/30 19:41:22 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.205 2013/10/17 21:06:15 christos Exp $");
 
 /*
 #define CBB_DEBUG
@@ -380,7 +380,7 @@ pccbbattach(device_t parent, device_t se
 	struct pccbb_softc *sc = device_private(self);
 	struct pci_attach_args *pa = aux;
 	pci_chipset_tag_t pc = pa->pa_pc;
-	pcireg_t busreg, reg, sock_base;
+	pcireg_t reg, sock_base;
 	bus_addr_t sockbase;
 	int flags;
 
@@ -455,8 +455,6 @@ pccbbattach(device_t parent, device_t se
 	sc->sc_mem_start = 0;	       /* XXX */
 	sc->sc_mem_end = 0xffffffff;   /* XXX */
 
-	busreg = pci_conf_read(pc, pa->pa_tag, PCI_BUSNUM);
-
 	/* pccbb_machdep.c end */
 
 #if defined CBB_DEBUG
@@ -548,9 +546,6 @@ pccbbdetach(device_t self, int flags)
 	case CBB_MEMHMAPPED|CBB_SPECMAPPED:
 #if rbus
 	{
-		pcireg_t sockbase;
-
-		sockbase = pci_conf_read(pc, sc->sc_tag, PCI_SOCKBASE);
 		rbus_space_free(sc->sc_rbus_memt, bmh, 0x1000,
 		    NULL);
 	}
@@ -967,9 +962,6 @@ STATIC void
 pccbb_pcmcia_attach_setup(struct pccbb_softc *sc,
     struct pcmciabus_attach_args *paa)
 {
-#if rbus
-	rbus_tag_t rb;
-#endif
 	/*
 	 * We need to do a few things here:
 	 * 1) Disable routing of CSC and functional interrupts to ISA IRQs by
@@ -993,10 +985,6 @@ pccbb_pcmcia_attach_setup(struct pccbb_s
 	paa->paa_busname = "pcmcia";
 	paa->pct = &pccbb_pcmcia_funcs;
 	paa->pch = sc;
-#if rbus
-	rb = sc->sc_rbus_iot;
-#endif
-
 	return;
 }
 
@@ -1148,7 +1136,12 @@ pci113x_insert(void *arg)
 	    CB_SOCKET_STAT);
 
 	if (0 == (sockstate & CB_SOCKET_STAT_CD)) {	/* card exist */
+#ifdef CBB_DEBUG
 		DPRINTF(("%s: 0x%08x", device_xname(sc->sc_dev), sockevent));
+#else
+		__USE(sockevent);
+#endif
+
 		DPRINTF((" card inserted, 0x%08x\n", sockstate));
 		sc->sc_flags |= CBB_CARDEXIST;
 		/* call pccard interrupt handler here */

Index: src/sys/dev/pci/twa.c
diff -u src/sys/dev/pci/twa.c:1.44 src/sys/dev/pci/twa.c:1.45
--- src/sys/dev/pci/twa.c:1.44	Sat Sep 14 09:12:03 2013
+++ src/sys/dev/pci/twa.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: twa.c,v 1.44 2013/09/14 13:12:03 joerg Exp $ */
+/*	$NetBSD: twa.c,v 1.45 2013/10/17 21:06:15 christos Exp $ */
 /*	$wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $	*/
 
 /*-
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.44 2013/09/14 13:12:03 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.45 2013/10/17 21:06:15 christos Exp $");
 
 //#define TWA_DEBUG
 
@@ -1128,7 +1128,6 @@ out:
 static int
 twa_drain_response_queue(struct twa_softc *sc)
 {
-	union twa_response_queue	rq;
 	uint32_t			status_reg;
 
 	for (;;) {
@@ -1137,7 +1136,7 @@ twa_drain_response_queue(struct twa_soft
 			return(1);
 		if (status_reg & TWA_STATUS_RESPONSE_QUEUE_EMPTY)
 			return(0); /* no more response queue entries */
-		rq.value = twa_inl(sc, TWA_RESPONSE_QUEUE_OFFSET);
+		(void)twa_inl(sc, TWA_RESPONSE_QUEUE_OFFSET);
 	}
 }
 
@@ -1643,7 +1642,7 @@ twa_shutdown(void *arg)
 {
 	extern struct cfdriver twa_cd;
 	struct twa_softc *sc;
-	int i, rv, unit;
+	int i, unit;
 
 	for (i = 0; i < twa_cd.cd_ndevs; i++) {
 		if ((sc = device_lookup_private(&twa_cd, i)) == NULL)
@@ -1658,7 +1657,7 @@ twa_shutdown(void *arg)
 			TWA_CONTROL_DISABLE_INTERRUPTS);
 
 		/* Let the controller know that we are going down. */
-		rv = twa_init_connection(sc, TWA_SHUTDOWN_MESSAGE_CREDITS,
+		(void)twa_init_connection(sc, TWA_SHUTDOWN_MESSAGE_CREDITS,
 				0, 0, 0, 0, 0,
 				NULL, NULL, NULL, NULL, NULL);
 	}

Index: src/sys/dev/pci/viomb.c
diff -u src/sys/dev/pci/viomb.c:1.1 src/sys/dev/pci/viomb.c:1.2
--- src/sys/dev/pci/viomb.c:1.1	Sun Oct 30 08:12:21 2011
+++ src/sys/dev/pci/viomb.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: viomb.c,v 1.1 2011/10/30 12:12:21 hannken Exp $	*/
+/*	$NetBSD: viomb.c,v 1.2 2013/10/17 21:06:15 christos Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.1 2011/10/30 12:12:21 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.2 2013/10/17 21:06:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -438,7 +438,7 @@ deflate_done(struct viomb_softc *sc)
 	struct virtqueue *vq = &sc->sc_vq[1];
 	struct balloon_req *b;
 	int r, slot;
-	uint64_t nvpages, nhpages;
+	uint64_t nvpages;
 
 	r = virtio_dequeue(vsc, vq, &slot, NULL);
 	if (r != 0) {
@@ -450,7 +450,6 @@ deflate_done(struct viomb_softc *sc)
 
 	b = &sc->sc_req;
 	nvpages = b->bl_nentries;
-	nhpages = nvpages * VIRTIO_PAGE_SIZE / PAGE_SIZE;
 	bus_dmamap_sync(vsc->sc_dmat, b->bl_dmamap,
 			offsetof(struct balloon_req, bl_pages),
 			sizeof(uint32_t)*nvpages,

Index: src/sys/dev/pci/weasel_pci.c
diff -u src/sys/dev/pci/weasel_pci.c:1.14 src/sys/dev/pci/weasel_pci.c:1.15
--- src/sys/dev/pci/weasel_pci.c:1.14	Wed Mar 18 12:00:19 2009
+++ src/sys/dev/pci/weasel_pci.c	Thu Oct 17 17:06:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: weasel_pci.c,v 1.14 2009/03/18 16:00:19 cegger Exp $	*/
+/*	$NetBSD: weasel_pci.c,v 1.15 2013/10/17 21:06:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: weasel_pci.c,v 1.14 2009/03/18 16:00:19 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: weasel_pci.c,v 1.15 2013/10/17 21:06:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -343,7 +343,6 @@ weasel_pci_wdog_tickle(struct sysmon_wdo
 static int
 weasel_pci_wdog_arm(struct weasel_softc *sc)
 {
-	u_int8_t reg;
 	int x;
 	int s;
 	int error = 0;
@@ -354,7 +353,7 @@ weasel_pci_wdog_arm(struct weasel_softc 
 			device_xname(sc->sc_dev));
 		error = EIO;
 	}
-	reg = bus_space_read_1(sc->sc_st, sc->sc_sh, WEASEL_DATA_RD);
+	(void)bus_space_read_1(sc->sc_st, sc->sc_sh, WEASEL_DATA_RD);
 	bus_space_write_1(sc->sc_st, sc->sc_sh, WEASEL_STATUS, 0);
 
 	/*
@@ -384,7 +383,6 @@ weasel_pci_wdog_arm(struct weasel_softc 
 static int
 weasel_pci_wdog_disarm(struct weasel_softc *sc)
 {
-	u_int8_t reg;
 	int x;
 	int s;
 	int error = 0;
@@ -396,7 +394,7 @@ weasel_pci_wdog_disarm(struct weasel_sof
 			device_xname(sc->sc_dev));
 		error = EIO;
 	}
-	reg = bus_space_read_1(sc->sc_st, sc->sc_sh, WEASEL_DATA_RD);
+	(void)bus_space_read_1(sc->sc_st, sc->sc_sh, WEASEL_DATA_RD);
 	bus_space_write_1(sc->sc_st, sc->sc_sh, WEASEL_STATUS, 0);
 
 	/*

Reply via email to