Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Make this compile when DIAGNOSTIC isn't defined.



details:   https://anonhg.NetBSD.org/src/rev/7b276434b678
branches:  trunk
changeset: 801632:7b276434b678
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Aug 12 08:06:46 2014 +0000

description:
Make this compile when DIAGNOSTIC isn't defined.

diffstat:

 sys/dev/usb/motg.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (73 lines):

diff -r 4fce22f285e0 -r 7b276434b678 sys/dev/usb/motg.c
--- a/sys/dev/usb/motg.c        Tue Aug 12 08:06:07 2014 +0000
+++ b/sys/dev/usb/motg.c        Tue Aug 12 08:06:46 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: motg.c,v 1.7 2014/08/12 08:06:07 skrll Exp $   */
+/*     $NetBSD: motg.c,v 1.8 2014/08/12 08:06:46 skrll Exp $   */
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.7 2014/08/12 08:06:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.8 2014/08/12 08:06:46 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1854,7 +1854,7 @@
 void
 motg_device_ctrl_close(usbd_pipe_handle pipe)
 {
-       struct motg_softc *sc = pipe->device->bus->hci_private;
+       struct motg_softc *sc __diagused = pipe->device->bus->hci_private;
        struct motg_pipe *otgpipe = (struct motg_pipe *)pipe;
        struct motg_pipe *otgpipeiter;
 
@@ -1879,7 +1879,7 @@
 void
 motg_device_ctrl_done(usbd_xfer_handle xfer)
 {
-       struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->pipe;
+       struct motg_pipe *otgpipe __diagused = (struct motg_pipe *)xfer->pipe;
        DPRINTFN(MD_CTRL, ("motg_device_ctrl_done:\n"));
        KASSERT(otgpipe->hw_ep->xfer != xfer);
 }
@@ -1931,7 +1931,7 @@
        usbd_xfer_handle xfer = NULL;
        struct motg_pipe *otgpipe;
        usbd_status err = 0;
-       uint32_t val;
+       uint32_t val __diagused;
 
        KASSERT(mutex_owned(&sc->sc_lock));
        if (sc->sc_dying)
@@ -2330,7 +2330,7 @@
 void
 motg_device_data_close(usbd_pipe_handle pipe)
 {
-       struct motg_softc *sc = pipe->device->bus->hci_private;
+       struct motg_softc *sc __diagused = pipe->device->bus->hci_private;
        struct motg_pipe *otgpipe = (struct motg_pipe *)pipe;
        struct motg_pipe *otgpipeiter;
 
@@ -2356,7 +2356,7 @@
 void
 motg_device_data_done(usbd_xfer_handle xfer)
 {
-       struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->pipe;
+       struct motg_pipe *otgpipe __diagused = (struct motg_pipe *)xfer->pipe;
        DPRINTFN(MD_CTRL, ("motg_device_data_done:\n"));
        KASSERT(otgpipe->hw_ep->xfer != xfer);
 }
@@ -2409,9 +2409,7 @@
 {
        int wake;
        uint8_t csr;
-#ifdef DIAGNOSTIC
        struct motg_softc *sc = xfer->pipe->device->bus->hci_private;
-#endif
        struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->pipe;
        KASSERT(mutex_owned(&sc->sc_lock));
 



Home | Main Index | Thread Index | Old Index