diff options
author | joe <joe@FreeBSD.org> | 2003-11-09 23:54:21 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2003-11-09 23:54:21 +0000 |
commit | 59ab76006add39277e6efb09d2e8e962a5823152 (patch) | |
tree | 0e79c0d728f99a2df25a61bbcbe5dff5067f4504 /sys/dev | |
parent | a6e2965d62192f0bd45970e72b5edab8cb17860f (diff) | |
download | FreeBSD-src-59ab76006add39277e6efb09d2e8e962a5823152.zip FreeBSD-src-59ab76006add39277e6efb09d2e8e962a5823152.tar.gz |
MFNetBSD:
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/ehci.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/ohci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/usb.c | 1 | ||||
-rw-r--r-- | sys/dev/usb/usb_port.h | 8 | ||||
-rw-r--r-- | sys/dev/usb/usbdi.c | 4 |
6 files changed, 10 insertions, 15 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index cb55f94..152d569 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1012,7 +1012,7 @@ ehci_allocx(struct usbd_bus *bus) xfer = SIMPLEQ_FIRST(&sc->sc_free_xfers); if (xfer != NULL) { - SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, xfer, next); + SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, next); #ifdef DIAGNOSTIC if (xfer->busy_free != XFER_FREE) { printf("uhci_allocx: xfer=%p not free, 0x%08x\n", xfer, diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index db62fea..3e09fb7 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.125 2002/05/28 12:42:38 augustss Exp $ */ +/* $NetBSD: ohci.c,v 1.126 2002/06/01 23:51:03 lukem Exp $ */ /* Also, already ported: * $NetBSD: ohci.c,v 1.127 2002/08/07 20:03:19 augustss Exp $ @@ -965,7 +965,7 @@ ohci_allocx(struct usbd_bus *bus) xfer = SIMPLEQ_FIRST(&sc->sc_free_xfers); if (xfer != NULL) { - SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, xfer, next); + SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, next); #ifdef DIAGNOSTIC if (xfer->busy_free != XFER_FREE) { printf("ohci_allocx: xfer=%p not free, 0x%08x\n", xfer, diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index c312606..d747cba 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.160 2002/05/28 12:42:39 augustss Exp $ */ +/* $NetBSD: uhci.c,v 1.161 2002/06/01 23:51:04 lukem Exp $ */ /* Also already incorporated from NetBSD: * $NetBSD: uhci.c,v 1.162 2002/07/11 21:14:28 augustss Exp $ @@ -599,7 +599,7 @@ uhci_detach(struct uhci_softc *sc, int flags) xfer = SIMPLEQ_FIRST(&sc->sc_free_xfers); if (xfer == NULL) break; - SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, xfer, next); + SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, next); free(xfer, M_USB); } @@ -629,7 +629,7 @@ uhci_allocx(struct usbd_bus *bus) xfer = SIMPLEQ_FIRST(&sc->sc_free_xfers); if (xfer != NULL) { - SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, xfer, next); + SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, next); #ifdef DIAGNOSTIC if (xfer->busy_free != XFER_FREE) { printf("uhci_allocx: xfer=%p not free, 0x%08x\n", xfer, diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index dd2e2b3..4f9034a 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -2,6 +2,7 @@ /* Also already merged from NetBSD: * $NetBSD: usb.c,v 1.70 2002/05/09 21:54:32 augustss Exp $ + * $NetBSD: usb.c,v 1.71 2002/06/01 23:51:04 lukem Exp $ * $NetBSD: usb.c,v 1.73 2002/09/23 05:51:19 simonb Exp $ */ diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 373baa3..bb9addc 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -492,13 +492,7 @@ __CONCAT(dname,_detach)(device_t self) (device_probe_and_attach((bdev)) == 0 ? (bdev) : 0) /* conversion from one type of queue to the other */ -/* XXX In FreeBSD SIMPLEQ_REMOVE_HEAD only removes the head element. - */ -#define SIMPLEQ_REMOVE_HEAD(h, e, f) do { \ - if ( (e) != SIMPLEQ_FIRST((h)) ) \ - panic("Removing other than first element"); \ - STAILQ_REMOVE_HEAD(h, f); \ -} while (0) +#define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL #define SIMPLEQ_NEXT STAILQ_NEXT diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index b8f23ae..970f67f 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.100 2002/05/19 06:24:33 augustss Exp $ */ +/* $NetBSD: usbdi.c,v 1.101 2002/06/01 23:51:04 lukem Exp $ */ /* Also already have from NetBSD: * $NetBSD: usbdi.c,v 1.102 2002/07/11 21:14:35 augustss Exp $ @@ -818,7 +818,7 @@ usb_transfer_complete(usbd_xfer_handle xfer) xfer, SIMPLEQ_FIRST(&pipe->queue)); xfer->busy_free = XFER_BUSY; #endif - SIMPLEQ_REMOVE_HEAD(&pipe->queue, xfer, next); + SIMPLEQ_REMOVE_HEAD(&pipe->queue, next); } DPRINTFN(5,("usb_transfer_complete: repeat=%d new head=%p\n", repeat, SIMPLEQ_FIRST(&pipe->queue))); |