Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ieee1394 Make it compilable with gcc 4.8.1



details:   https://anonhg.NetBSD.org/src/rev/8be813306962
branches:  trunk
changeset: 789914:8be813306962
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Sep 12 20:16:51 2013 +0000

description:
Make it compilable with gcc 4.8.1

diffstat:

 sys/dev/ieee1394/fwohci.c |  36 ++++++++++++++++++++++++++----------
 1 files changed, 26 insertions(+), 10 deletions(-)

diffs (129 lines):

diff -r 5e8b31b884b0 -r 8be813306962 sys/dev/ieee1394/fwohci.c
--- a/sys/dev/ieee1394/fwohci.c Thu Sep 12 20:03:10 2013 +0000
+++ b/sys/dev/ieee1394/fwohci.c Thu Sep 12 20:16:51 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fwohci.c,v 1.134 2013/04/07 07:42:20 kiyohara Exp $    */
+/*     $NetBSD: fwohci.c,v 1.135 2013/09/12 20:16:51 martin Exp $      */
 
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  *
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.134 2013/04/07 07:42:20 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.135 2013/09/12 20:16:51 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -919,13 +919,10 @@
        struct fw_xferq *it;
        uint32_t stat;
        int cycle_match, cycle_now, ldesc, err = 0;
-       unsigned short tag, ich;
 
        dbch = &sc->it[dmach];
        it = &dbch->xferq;
 
-       tag = (it->flag >> 6) & 3;
-       ich = it->flag & 0x3f;
        if ((dbch->flags & FWOHCI_DBCH_INIT) == 0) {
                dbch->ndb = it->bnpacket * it->bnchunk;
                dbch->ndesc = 3;
@@ -2194,7 +2191,10 @@
        struct fwohcidb *db;
        struct fw_bulkxfer *chunk;
        struct fw_xferq *it;
-       uint32_t stat, count;
+       uint32_t stat;
+#if 0
+       uint32_t count;
+#endif
        int w = 0, ldesc;
 
        it = fc->it[dmach];
@@ -2209,8 +2209,12 @@
                    FWOHCI_DMA_READ(db[ldesc].db.desc.res) >> OHCI_STATUS_SHIFT;
                db = ((struct fwohcidb_tr *)(chunk->start))->db;
                /* timestamp */
+#if 0
                count =
                    FWOHCI_DMA_READ(db[ldesc].db.desc.res) & OHCI_COUNT_MASK;
+#else
+               (void)FWOHCI_DMA_READ(db[ldesc].db.desc.res);
+#endif
                if (stat == 0)
                        break;
                STAILQ_REMOVE_HEAD(&it->stdma, link);
@@ -2344,8 +2348,12 @@
 dump_db(struct fwohci_softc *sc, uint32_t ch)
 {
        struct fwohci_dbch *dbch;
-       struct fwohcidb_tr *cp = NULL, *pp, *np = NULL;
-       struct fwohcidb *curr = NULL, *prev, *next = NULL;
+       struct fwohcidb_tr *cp = NULL, *pp;
+       struct fwohcidb *curr = NULL;
+#if 0
+       struct fwohcidb_tr *np = NULL;
+       struct fwohcidb *prev, *next = NULL;
+#endif
        int idb, jdb;
        uint32_t cmd;
 
@@ -2368,21 +2376,27 @@
                return;
        }
        pp = dbch->top;
+#if 0
        prev = pp->db;
+#endif
        for (idb = 0; idb < dbch->ndb; idb++) {
                cp = STAILQ_NEXT(pp, link);
                if (cp == NULL) {
                        curr = NULL;
                        goto outdb;
                }
+#if 0
                np = STAILQ_NEXT(cp, link);
+#endif
                for (jdb = 0; jdb < dbch->ndesc; jdb++)
                        if ((cmd & 0xfffffff0) == cp->bus_addr) {
                                curr = cp->db;
+#if 0
                                if (np != NULL)
                                        next = np->db;
                                else
                                        next = NULL;
+#endif
                                goto outdb;
                        }
                pp = STAILQ_NEXT(pp, link);
@@ -2390,7 +2404,9 @@
                        curr = NULL;
                        goto outdb;
                }
+#if 0
                prev = pp->db;
+#endif
        }
 outdb:
        if (curr != NULL) {
@@ -2486,7 +2502,7 @@
 static void
 fwohci_txbufdb(struct fwohci_softc *sc, int dmach, struct fw_bulkxfer *bulkxfer)
 {
-       struct fwohcidb_tr *db_tr, *fdb_tr;
+       struct fwohcidb_tr *db_tr /*, *fdb_tr */;
        struct fwohci_dbch *dbch;
        struct fwohcidb *db;
        struct fw_pkt *fp;
@@ -2500,8 +2516,8 @@
        chtag = sc->it[dmach].xferq.flag & 0xff;
 
        db_tr = (struct fwohcidb_tr *)(bulkxfer->start);
+/*
        fdb_tr = (struct fwohcidb_tr *)(bulkxfer->end);
-/*
 aprint_normal(sc->fc.dev, "DB %08x %08x %08x\n", bulkxfer, db_tr->bus_addr, fdb_tr->bus_addr);
 */
        for (idb = 0; idb < dbch->xferq.bnpacket; idb++) {



Home | Main Index | Thread Index | Old Index