mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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()
This commit is contained in:
parent
2da3337a41
commit
35b64e1272
6 changed files with 10 additions and 15 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 $
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue