diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-09-15 02:00:19 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-09-15 02:00:19 +0000 |
commit | 9d8236625502d9aebd87ee4b8aa759eb7dd062ae (patch) | |
tree | 608f67fdaff3caceaeb03f449b57d21037a3fe79 /sys/dev/usb | |
parent | 2470899b803a7fb5d135883edd5ddd82d6a592c7 (diff) |
all pools have their ipl set via pool_setipl, so fold it into pool_init.
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/dwc2/dwc2.c | 11 | ||||
-rw-r--r-- | sys/dev/usb/ehci.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/ohci.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/xhci.c | 7 |
5 files changed, 16 insertions, 23 deletions
diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c index 354e713ed82..55dc4a00afb 100644 --- a/sys/dev/usb/dwc2/dwc2.c +++ b/sys/dev/usb/dwc2/dwc2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwc2.c,v 1.36 2015/12/23 12:38:40 visa Exp $ */ +/* $OpenBSD: dwc2.c,v 1.37 2016/09/15 02:00:18 dlg Exp $ */ /* $NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $ */ /*- @@ -1563,15 +1563,12 @@ dwc2_init(struct dwc2_softc *sc) USB_MEM_RESERVE); #endif - pool_init(&sc->sc_xferpool, sizeof(struct dwc2_xfer), 0, 0, 0, + pool_init(&sc->sc_xferpool, sizeof(struct dwc2_xfer), 0, IPL_USB, 0, "dwc2xfer", NULL); - pool_setipl(&sc->sc_xferpool, IPL_USB); - pool_init(&sc->sc_qhpool, sizeof(struct dwc2_qh), 0, 0, 0, + pool_init(&sc->sc_qhpool, sizeof(struct dwc2_qh), 0, IPL_USB, 0, "dwc2qh", NULL); - pool_setipl(&sc->sc_qhpool, IPL_USB); - pool_init(&sc->sc_qtdpool, sizeof(struct dwc2_qtd), 0, 0, 0, + pool_init(&sc->sc_qtdpool, sizeof(struct dwc2_qtd), 0, IPL_USB, 0, "dwc2qtd", NULL); - pool_setipl(&sc->sc_qtdpool, IPL_USB); sc->sc_hsotg = malloc(sizeof(struct dwc2_hsotg), M_DEVBUF, M_ZERO | M_WAITOK); diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 0daf622b3ba..2d5c461cdad 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.192 2016/08/18 11:59:58 jsg Exp $ */ +/* $OpenBSD: ehci.c,v 1.193 2016/09/15 02:00:17 dlg Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -338,9 +338,8 @@ ehci_init(struct ehci_softc *sc) sc->sc_bus.bdev.dv_xname); return (ENOMEM); } - pool_init(ehcixfer, sizeof(struct ehci_xfer), 0, 0, 0, - "ehcixfer", NULL); - pool_setipl(ehcixfer, IPL_SOFTUSB); + pool_init(ehcixfer, sizeof(struct ehci_xfer), 0, IPL_SOFTUSB, + 0, "ehcixfer", NULL); } /* frame list size at default, read back what we got and use that */ diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 47f4a607278..c955b5b3087 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.146 2015/12/02 09:43:03 yasuoka Exp $ */ +/* $OpenBSD: ohci.c,v 1.147 2016/09/15 02:00:17 dlg Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -724,9 +724,8 @@ ohci_init(struct ohci_softc *sc) sc->sc_bus.bdev.dv_xname); return (ENOMEM); } - pool_init(ohcixfer, sizeof(struct ohci_xfer), 0, 0, 0, - "ohcixfer", NULL); - pool_setipl(ohcixfer, IPL_SOFTUSB); + pool_init(ohcixfer, sizeof(struct ohci_xfer), 0, IPL_SOFTUSB, + 0, "ohcixfer", NULL); } /* XXX determine alignment by R/W */ diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 01437345118..3d9da9b4805 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci.c,v 1.138 2015/06/26 11:17:34 mpi Exp $ */ +/* $OpenBSD: uhci.c,v 1.139 2016/09/15 02:00:17 dlg Exp $ */ /* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -370,9 +370,8 @@ uhci_init(struct uhci_softc *sc) sc->sc_bus.bdev.dv_xname); return (ENOMEM); } - pool_init(uhcixfer, sizeof(struct uhci_xfer), 0, 0, 0, - "uhcixfer", NULL); - pool_setipl(uhcixfer, IPL_SOFTUSB); + pool_init(uhcixfer, sizeof(struct uhci_xfer), 0, IPL_SOFTUSB, + 0, "uhcixfer", NULL); } /* Restore saved SOF. */ diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 358ccf4794f..2ae393c0c6c 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.66 2015/12/02 09:23:23 mpi Exp $ */ +/* $OpenBSD: xhci.c,v 1.67 2016/09/15 02:00:17 dlg Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -311,9 +311,8 @@ xhci_init(struct xhci_softc *sc) DEVNAME(sc)); return (ENOMEM); } - pool_init(xhcixfer, sizeof(struct xhci_xfer), 0, 0, 0, - "xhcixfer", NULL); - pool_setipl(xhcixfer, IPL_SOFTUSB); + pool_init(xhcixfer, sizeof(struct xhci_xfer), 0, IPL_SOFTUSB, + 0, "xhcixfer", NULL); } hcr = XREAD4(sc, XHCI_HCCPARAMS); |