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 it compile without DIAGNOSTIC.



details:   https://anonhg.NetBSD.org/src/rev/b0ef33798094
branches:  trunk
changeset: 484162:b0ef33798094
user:      augustss <augustss%NetBSD.org@localhost>
date:      Mon Mar 27 07:39:48 2000 +0000

description:
Make it compile without DIAGNOSTIC.

diffstat:

 sys/dev/usb/uhci.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (61 lines):

diff -r 180e7885099f -r b0ef33798094 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Mon Mar 27 07:04:21 2000 +0000
+++ b/sys/dev/usb/uhci.c        Mon Mar 27 07:39:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.97 2000/03/26 21:42:54 augustss Exp $       */
+/*     $NetBSD: uhci.c,v 1.98 2000/03/27 07:39:48 augustss Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $       */
 
 /*
@@ -562,10 +562,12 @@
        xfer = SIMPLEQ_FIRST(&sc->sc_free_xfers);
        if (xfer != NULL) {
                SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, xfer, next);
+#ifdef DIAGNOSTIC
                if (xfer->busy_free != XFER_FREE) {
                        printf("uhci_freex: xfer=%p not free, 0x%08x\n", xfer,
                               xfer->busy_free);
                }
+#endif
        } else {
                xfer = malloc(sizeof(struct uhci_xfer), M_USB, M_NOWAIT);
        }
@@ -820,29 +822,35 @@
        usb_endpoint_descriptor_t *ed;
        usbd_device_handle dev;
        
+#ifdef DIAGNOSTIC
+#define DONE ii->isdone
+#else
+#define DONE 0
+#endif
         if (ii == NULL) {
                 printf("ii NULL\n");
                 return;
         }
         if (ii->xfer == NULL) {
                printf("ii %p: done=%d xfer=NULL\n",
-                      ii, ii->isdone);
+                      ii, DONE);
                 return;
         }
         pipe = ii->xfer->pipe;
         if (pipe == NULL) {
                printf("ii %p: done=%d xfer=%p pipe=NULL\n",
-                      ii, ii->isdone, ii->xfer);
+                      ii, DONE, ii->xfer);
                 return;
        }
         ed = pipe->endpoint->edesc;
         dev = pipe->device;
        printf("ii %p: done=%d xfer=%p dev=%p vid=0x%04x pid=0x%04x addr=%d pipe=%p ep=0x%02x attr=0x%02x\n", 
-              ii, ii->isdone, ii->xfer, dev, 
+              ii, DONE, ii->xfer, dev, 
               UGETW(dev->ddesc.idVendor),
               UGETW(dev->ddesc.idProduct),
               dev->address, pipe,
               ed->bEndpointAddress, ed->bmAttributes);
+#undef DONE
 }
 
 void uhci_dump_iis(struct uhci_softc *);



Home | Main Index | Thread Index | Old Index