Module Name: src
Committed By: skrll
Date: Tue Dec 1 07:38:58 UTC 2015
Modified Files:
src/sys/dev/usb [nick-nhusb]: ohci.c ohcivar.h
Log Message:
Make isdone a bool
To generate a diff of this commit:
cvs rdiff -u -r1.254.2.30 -r1.254.2.31 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.55.6.8 -r1.55.6.9 src/sys/dev/usb/ohcivar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.30 src/sys/dev/usb/ohci.c:1.254.2.31
--- src/sys/dev/usb/ohci.c:1.254.2.30 Tue Dec 1 06:47:09 2015
+++ src/sys/dev/usb/ohci.c Tue Dec 1 07:38:58 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.254.2.30 2015/12/01 06:47:09 skrll Exp $ */
+/* $NetBSD: ohci.c,v 1.254.2.31 2015/12/01 07:38:58 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.30 2015/12/01 06:47:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.31 2015/12/01 07:38:58 skrll Exp $");
#include "opt_usb.h"
@@ -620,7 +620,7 @@ ohci_alloc_sitd(ohci_softc_t *sc)
ohci_hash_add_itd(sc, sitd);
#ifdef DIAGNOSTIC
- sitd->isdone = 0;
+ sitd->isdone = false;
#endif
return sitd;
@@ -636,7 +636,7 @@ ohci_free_sitd(ohci_softc_t *sc, ohci_so
KASSERT(sitd->isdone);
#ifdef DIAGNOSTIC
/* Warn double free */
- sitd->isdone = 0;
+ sitd->isdone = false;
#endif
ohci_hash_rem_itd(sc, sitd);
@@ -1401,7 +1401,7 @@ ohci_softintr(void *v)
}
KASSERT(!sitd->isdone);
#ifdef DIAGNOSTIC
- sitd->isdone = 1;
+ sitd->isdone = true;
#endif
if (sitd->flags & OHCI_CALL_DONE) {
ohci_soft_itd_t *next;
@@ -3355,7 +3355,7 @@ ohci_device_isoc_abort(struct usbd_xfer
for (; sitd->xfer == xfer; sitd = sitd->nextitd) {
#ifdef DIAGNOSTIC
DPRINTFN(1, "abort sets done sitd=%p", sitd, 0, 0, 0);
- sitd->isdone = 1;
+ sitd->isdone = true;
#endif
}
@@ -3409,7 +3409,7 @@ ohci_device_isoc_close(struct usbd_pipe
DPRINTF("pipe=%p", pipe, 0, 0, 0);
ohci_close_pipe(pipe, sc->sc_isoc_head);
#ifdef DIAGNOSTIC
- opipe->tail.itd->isdone = 1;
+ opipe->tail.itd->isdone = true;
#endif
ohci_free_sitd(sc, opipe->tail.itd);
}
Index: src/sys/dev/usb/ohcivar.h
diff -u src/sys/dev/usb/ohcivar.h:1.55.6.8 src/sys/dev/usb/ohcivar.h:1.55.6.9
--- src/sys/dev/usb/ohcivar.h:1.55.6.8 Thu Oct 22 11:15:42 2015
+++ src/sys/dev/usb/ohcivar.h Tue Dec 1 07:38:58 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: ohcivar.h,v 1.55.6.8 2015/10/22 11:15:42 skrll Exp $ */
+/* $NetBSD: ohcivar.h,v 1.55.6.9 2015/12/01 07:38:58 skrll Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@ typedef struct ohci_soft_itd {
LIST_ENTRY(ohci_soft_itd) hnext;
struct usbd_xfer *xfer;
uint16_t flags;
- char isdone; /* used only when DIAGNOSTIC is defined */
+ bool isdone; /* used only when DIAGNOSTIC is defined */
} ohci_soft_itd_t;
#define OHCI_SITD_SIZE ((sizeof(struct ohci_soft_itd) + OHCI_ITD_ALIGN - 1) / OHCI_ITD_ALIGN * OHCI_ITD_ALIGN)
#define OHCI_SITD_CHUNK 64