Module Name: src
Committed By: mrg
Date: Tue Mar 11 08:19:45 UTC 2014
Modified Files:
src/sys/arch/evbmips/gdium: gdium_intr.c
src/sys/arch/mips/bonito: bonito_pci.c
src/sys/arch/mips/rmi: rmixl_pcix.c rmixlvar.h
src/sys/dev/pci/voyager: voyagerfb.c
Log Message:
avoid set but unused variables.
move variables under their usage #ifdef.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/gdium/gdium_intr.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/bonito/bonito_pci.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/rmi/rmixl_pcix.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/rmi/rmixlvar.h
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/voyager/voyagerfb.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/arch/evbmips/gdium/gdium_intr.c
diff -u src/sys/arch/evbmips/gdium/gdium_intr.c:1.5 src/sys/arch/evbmips/gdium/gdium_intr.c:1.6
--- src/sys/arch/evbmips/gdium/gdium_intr.c:1.5 Sun Jul 10 00:03:53 2011
+++ src/sys/arch/evbmips/gdium/gdium_intr.c Tue Mar 11 08:19:45 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: gdium_intr.c,v 1.5 2011/07/10 00:03:53 matt Exp $ */
+/* $NetBSD: gdium_intr.c,v 1.6 2014/03/11 08:19:45 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gdium_intr.c,v 1.5 2011/07/10 00:03:53 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gdium_intr.c,v 1.6 2014/03/11 08:19:45 mrg Exp $");
#define __INTR_PRIVATE
@@ -299,7 +299,6 @@ evbmips_intr_disestablish(void *cookie)
void
evbmips_iointr(int ipl, vaddr_t pc, uint32_t ipending)
{
- const struct gdium_irqmap *irqmap;
struct evbmips_intrhand *ih;
int level;
uint32_t isr;
@@ -315,7 +314,6 @@ evbmips_iointr(int ipl, vaddr_t pc, uint
continue;
gdium_cpuintrs[level].cintr_count.ev_count++;
LIST_FOREACH (ih, &gdium_cpuintrs[level].cintr_list, ih_q) {
- irqmap = &gdium_irqmap[ih->ih_irq];
if (isr & (1 << ih->ih_irq)) {
gdium_intrtab[ih->ih_irq].intr_count.ev_count++;
(*ih->ih_func)(ih->ih_arg);
Index: src/sys/arch/mips/bonito/bonito_pci.c
diff -u src/sys/arch/mips/bonito/bonito_pci.c:1.10 src/sys/arch/mips/bonito/bonito_pci.c:1.11
--- src/sys/arch/mips/bonito/bonito_pci.c:1.10 Sat Aug 27 12:59:16 2011
+++ src/sys/arch/mips/bonito/bonito_pci.c Tue Mar 11 08:19:45 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: bonito_pci.c,v 1.10 2011/08/27 12:59:16 bouyer Exp $ */
+/* $NetBSD: bonito_pci.c,v 1.11 2014/03/11 08:19:45 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bonito_pci.c,v 1.10 2011/08/27 12:59:16 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bonito_pci.c,v 1.11 2014/03/11 08:19:45 mrg Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -139,7 +139,7 @@ bonito_conf_read(void *v, pcitag_t tag,
{
struct bonito_config *bc = v;
pcireg_t data;
- u_int32_t cfgoff, dummy, pcimap_cfg;
+ u_int32_t cfgoff, pcimap_cfg;
int s;
if (bonito_conf_addr(bc, tag, offset, &cfgoff, &pcimap_cfg))
@@ -156,7 +156,7 @@ bonito_conf_read(void *v, pcitag_t tag,
wbflush();
/* Issue a read to make sure the write is posted */
- dummy = REGVAL(BONITO_PCIMAP_CFG);
+ (void)REGVAL(BONITO_PCIMAP_CFG);
/* low 16 bits of address are offset into config space */
data = REGVAL(BONITO_PCICFG_BASE + (cfgoff & 0xfffc));
@@ -175,7 +175,7 @@ void
bonito_conf_write(void *v, pcitag_t tag, int offset, pcireg_t data)
{
struct bonito_config *vt = v;
- u_int32_t cfgoff, dummy, pcimap_cfg;
+ u_int32_t cfgoff, pcimap_cfg;
int s;
if (bonito_conf_addr(vt, tag, offset, &cfgoff, &pcimap_cfg))
@@ -192,7 +192,7 @@ bonito_conf_write(void *v, pcitag_t tag,
wbflush();
/* Issue a read to make sure the write is posted */
- dummy = REGVAL(BONITO_PCIMAP_CFG);
+ (void)REGVAL(BONITO_PCIMAP_CFG);
/* low 16 bits of address are offset into config space */
REGVAL(BONITO_PCICFG_BASE + (cfgoff & 0xfffc)) = data;
Index: src/sys/arch/mips/rmi/rmixl_pcix.c
diff -u src/sys/arch/mips/rmi/rmixl_pcix.c:1.10 src/sys/arch/mips/rmi/rmixl_pcix.c:1.11
--- src/sys/arch/mips/rmi/rmixl_pcix.c:1.10 Sat Oct 27 17:18:03 2012
+++ src/sys/arch/mips/rmi/rmixl_pcix.c Tue Mar 11 08:19:45 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixl_pcix.c,v 1.10 2012/10/27 17:18:03 chs Exp $ */
+/* $NetBSD: rmixl_pcix.c,v 1.11 2014/03/11 08:19:45 mrg Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.10 2012/10/27 17:18:03 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.11 2014/03/11 08:19:45 mrg Exp $");
#include "opt_pci.h"
#include "pci.h"
@@ -385,11 +385,14 @@ rmixl_pcix_attach(device_t parent, devic
* check PCI-X interface byteswap setup
* ensure 'Match Byte Lane' is disabled
*/
- uint32_t mble, mba, mbs;
+ uint32_t mble;
mble = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_XLR_MBLE);
+#ifdef PCI_DEBUG
+ uint32_t mba, mbs;
mba = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_MATCH_BIT_ADDR);
mbs = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_MATCH_BIT_SIZE);
DPRINTF(("%s: MBLE=%#x, MBA=%#x, MBS=%#x\n", __func__, mble, mba, mbs));
+#endif
if ((mble & __BIT(40)) != 0)
RMIXL_PCIXREG_WRITE(RMIXL_PCIX_ECFG_XLR_MBLE, 0);
Index: src/sys/arch/mips/rmi/rmixlvar.h
diff -u src/sys/arch/mips/rmi/rmixlvar.h:1.6 src/sys/arch/mips/rmi/rmixlvar.h:1.7
--- src/sys/arch/mips/rmi/rmixlvar.h:1.6 Fri Jul 1 19:01:31 2011
+++ src/sys/arch/mips/rmi/rmixlvar.h Tue Mar 11 08:19:45 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixlvar.h,v 1.6 2011/07/01 19:01:31 dyoung Exp $ */
+/* $NetBSD: rmixlvar.h,v 1.7 2014/03/11 08:19:45 mrg Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -208,14 +208,13 @@ rmixl_cache_err_check(void)
static inline int
rmixl_probe_4(volatile uint32_t *va)
{
- uint32_t tmp;
uint32_t r;
int err;
int s;
s = splhigh();
r = rmixl_cache_err_dis();
- tmp = *va; /* probe */
+ (void)*va; /* probe */
err = rmixl_cache_err_check();
rmixl_cache_err_restore(r);
splx(s);
Index: src/sys/dev/pci/voyager/voyagerfb.c
diff -u src/sys/dev/pci/voyager/voyagerfb.c:1.26 src/sys/dev/pci/voyager/voyagerfb.c:1.27
--- src/sys/dev/pci/voyager/voyagerfb.c:1.26 Tue Jul 30 19:21:50 2013
+++ src/sys/dev/pci/voyager/voyagerfb.c Tue Mar 11 08:19:45 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: voyagerfb.c,v 1.26 2013/07/30 19:21:50 macallan Exp $ */
+/* $NetBSD: voyagerfb.c,v 1.27 2014/03/11 08:19:45 mrg Exp $ */
/*
* Copyright (c) 2009, 2011 Michael Lorenz
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.26 2013/07/30 19:21:50 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.27 2014/03/11 08:19:45 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1065,7 +1065,7 @@ voyagerfb_putchar_aa8(void *cookie, int
struct vcons_screen *scr = ri->ri_hw;
struct voyagerfb_softc *sc = scr->scr_cookie;
uint32_t cmd;
- int fg, bg;
+ int bg;
uint8_t *data;
int x, y, wi, he;
int i, j, r, g, b, aval, pad;
@@ -1083,7 +1083,6 @@ voyagerfb_putchar_aa8(void *cookie, int
he = font->fontheight;
bg = ri->ri_devcmap[(attr >> 16) & 0x0f];
- fg = ri->ri_devcmap[(attr >> 24) & 0x0f];
x = ri->ri_xorigin + col * wi;
y = ri->ri_yorigin + row * he;
if (c == 0x20) {