Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sun3 fix unused warnings



details:   https://anonhg.NetBSD.org/src/rev/f2964c925b5f
branches:  trunk
changeset: 791176:f2964c925b5f
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 07 17:50:18 2013 +0000

description:
fix unused warnings

diffstat:

 sys/arch/sun3/dev/si_sebuf.c |   7 +++----
 sys/arch/sun3/dev/xy.c       |   7 +++----
 sys/arch/sun3/sun3/dvma.c    |  10 +++++-----
 sys/arch/sun3/sun3/pmap.c    |  13 ++++++-------
 4 files changed, 17 insertions(+), 20 deletions(-)

diffs (165 lines):

diff -r 59cbd46d867f -r f2964c925b5f sys/arch/sun3/dev/si_sebuf.c
--- a/sys/arch/sun3/dev/si_sebuf.c      Thu Nov 07 17:50:02 2013 +0000
+++ b/sys/arch/sun3/dev/si_sebuf.c      Thu Nov 07 17:50:18 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: si_sebuf.c,v 1.28 2009/11/21 04:16:52 rmind Exp $      */
+/*     $NetBSD: si_sebuf.c,v 1.29 2013/11/07 17:50:18 christos Exp $   */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: si_sebuf.c,v 1.28 2009/11/21 04:16:52 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: si_sebuf.c,v 1.29 2013/11/07 17:50:18 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -526,11 +526,10 @@
 {
        struct se_softc *sc = arg;
        volatile struct se_regs *se = sc->sc_regs;
-       int dma_error, claimed;
+       int claimed;
        u_short csr;
 
        claimed = 0;
-       dma_error = 0;
 
        /* SBC interrupt? DMA interrupt? */
        csr = se->se_csr;
diff -r 59cbd46d867f -r f2964c925b5f sys/arch/sun3/dev/xy.c
--- a/sys/arch/sun3/dev/xy.c    Thu Nov 07 17:50:02 2013 +0000
+++ b/sys/arch/sun3/dev/xy.c    Thu Nov 07 17:50:18 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xy.c,v 1.72 2011/02/01 20:19:32 chuck Exp $    */
+/*     $NetBSD: xy.c,v 1.73 2013/11/07 17:50:18 christos Exp $ */
 
 /*
  * Copyright (c) 1995 Charles D. Cranor
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.72 2011/02/01 20:19:32 chuck Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.73 2013/11/07 17:50:18 christos Exp $");
 
 #undef XYC_DEBUG               /* full debug */
 #undef XYC_DIAG                        /* extra sanity checks */
@@ -1241,7 +1241,6 @@
 int 
 xyc_startbuf(struct xyc_softc *xycsc, struct xy_softc *xysc, struct buf *bp)
 {
-       int partno;
        struct xy_iorq *iorq;
        struct xy_iopb *iopb;
        u_long  block;
@@ -1255,8 +1254,8 @@
        if (bp == NULL)
                panic("%s null buf", __func__);
 
-       partno = DISKPART(bp->b_dev);
 #ifdef XYC_DEBUG
+       int partno = DISKPART(bp->b_dev);
        printf("%s: %s%c: %s block %d\n", __func__, device_xname(xysc->sc_dev),
            'a' + partno, (bp->b_flags & B_READ) ? "read" : "write",
            (int)bp->b_blkno);
diff -r 59cbd46d867f -r f2964c925b5f sys/arch/sun3/sun3/dvma.c
--- a/sys/arch/sun3/sun3/dvma.c Thu Nov 07 17:50:02 2013 +0000
+++ b/sys/arch/sun3/sun3/dvma.c Thu Nov 07 17:50:18 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dvma.c,v 1.39 2013/09/07 15:56:11 tsutsui Exp $        */
+/*     $NetBSD: dvma.c,v 1.40 2013/11/07 17:50:18 christos Exp $       */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dvma.c,v 1.39 2013/09/07 15:56:11 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dvma.c,v 1.40 2013/11/07 17:50:18 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -239,7 +239,7 @@
        vaddr_t seg_dma;
        vsize_t seg_len, seg_off;
        vaddr_t v, x;
-       int sme;
+       int sme __diagused;
        int s;
 
        /* Get seg-aligned address and length. */
@@ -292,7 +292,7 @@
        vsize_t off, sgsize;
        paddr_t pa;
        pmap_t pmap;
-       int error, rv, s;
+       int error, rv __diagused, s;
 
        /*
         * Make sure that on error condition we return "no valid mappings".
@@ -356,7 +356,7 @@
        bus_dma_segment_t *segs;
        vaddr_t dva;
        vsize_t sgsize;
-       int error, s;
+       int error __diagused, s;
 
 #ifdef DIAGNOSTIC
        if (map->dm_nsegs != 1)
diff -r 59cbd46d867f -r f2964c925b5f sys/arch/sun3/sun3/pmap.c
--- a/sys/arch/sun3/sun3/pmap.c Thu Nov 07 17:50:02 2013 +0000
+++ b/sys/arch/sun3/sun3/pmap.c Thu Nov 07 17:50:18 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.169 2013/09/07 15:56:11 tsutsui Exp $       */
+/*     $NetBSD: pmap.c,v 1.170 2013/11/07 17:50:18 christos Exp $      */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.169 2013/09/07 15:56:11 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.170 2013/11/07 17:50:18 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pmap_debug.h"
@@ -3044,9 +3044,8 @@
 void
 pmap_protect_mmu(pmap_t pmap, vaddr_t sva, vaddr_t eva)
 {
-       pmeg_t pmegp;
        vaddr_t pgva, segva;
-       int pte, sme;
+       int pte;
 #ifdef HAVECACHE
        int flush_by_page = 0;
 #endif
@@ -3061,9 +3060,9 @@
 #endif
 
        segva = sun3_trunc_seg(sva);
-       sme = get_segmap(segva);
 
 #ifdef DIAGNOSTIC
+       int sme = get_segmap(segva);
        /* Make sure it is valid and known. */
        if (sme == SEGINV)
                panic("pmap_protect_mmu: SEGINV");
@@ -3071,10 +3070,10 @@
                panic("pmap_protect_mmu: incorrect sme, va=0x%lx", segva);
 #endif
 
-       pmegp = pmeg_p(sme);
-       /* have pmeg, will travel */
 
 #ifdef DIAGNOSTIC
+       /* have pmeg, will travel */
+       pmeg_t pmegp = pmeg_p(sme);
        /* Make sure we own the pmeg, right va, etc. */
        if ((pmegp->pmeg_va != segva) ||
            (pmegp->pmeg_owner != pmap) ||



Home | Main Index | Thread Index | Old Index