summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2017-02-12 17:41:17 +0000
committervisa <visa@openbsd.org>2017-02-12 17:41:17 +0000
commitfa0f9cf499e63296663f106ce7d608db8fb6f282 (patch)
treebfbbdedbc64eb5c22f4dff034bb85a5ec57ab260
parentRemove dead assignment and now unused variable. (diff)
downloadwireguard-openbsd-fa0f9cf499e63296663f106ce7d608db8fb6f282.tar.xz
wireguard-openbsd-fa0f9cf499e63296663f106ce7d608db8fb6f282.zip
Replace dummy mutex asserts with real ones.
OK stsp@
-rw-r--r--sys/dev/usb/dwc2/dwc2.c4
-rw-r--r--sys/dev/usb/dwc2/dwc2_coreintr.c4
-rw-r--r--sys/dev/usb/dwc2/dwc2_hcdintr.c4
-rw-r--r--sys/dev/usb/dwc2/dwc2var.h4
4 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c
index 6237ddb7200..def32a27fee 100644
--- a/sys/dev/usb/dwc2/dwc2.c
+++ b/sys/dev/usb/dwc2/dwc2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2.c,v 1.39 2017/02/04 19:22:42 guenther Exp $ */
+/* $OpenBSD: dwc2.c,v 1.40 2017/02/12 17:41:17 visa Exp $ */
/* $NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $ */
/*-
@@ -1703,7 +1703,7 @@ void dwc2_host_complete(struct dwc2_hsotg *hsotg, struct dwc2_qtd *qtd,
timeout_del(&xfer->timeout_handle);
usb_rem_task(xfer->device, &xfer->abort_task);
- KASSERT(mtx_owned(&hsotg->lock));
+ MUTEX_ASSERT_LOCKED(&hsotg->lock);
TAILQ_INSERT_TAIL(&sc->sc_complete, dxfer, xnext);
diff --git a/sys/dev/usb/dwc2/dwc2_coreintr.c b/sys/dev/usb/dwc2/dwc2_coreintr.c
index 03f276af57e..c1f65fea945 100644
--- a/sys/dev/usb/dwc2/dwc2_coreintr.c
+++ b/sys/dev/usb/dwc2/dwc2_coreintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_coreintr.c,v 1.8 2015/06/28 11:48:18 jmatthew Exp $ */
+/* $OpenBSD: dwc2_coreintr.c,v 1.9 2017/02/12 17:41:17 visa Exp $ */
/* $NetBSD: dwc2_coreintr.c,v 1.8 2014/04/04 05:40:57 skrll Exp $ */
/*
@@ -490,7 +490,7 @@ irqreturn_t dwc2_handle_common_intr(void *dev)
goto out;
}
- KASSERT(mtx_owned(&hsotg->lock));
+ MUTEX_ASSERT_LOCKED(&hsotg->lock);
gintsts = dwc2_read_common_intr(hsotg);
if (gintsts & ~GINTSTS_PRTINT)
diff --git a/sys/dev/usb/dwc2/dwc2_hcdintr.c b/sys/dev/usb/dwc2/dwc2_hcdintr.c
index 33f5b211900..34a0d9d5cd2 100644
--- a/sys/dev/usb/dwc2/dwc2_hcdintr.c
+++ b/sys/dev/usb/dwc2/dwc2_hcdintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_hcdintr.c,v 1.6 2015/06/28 11:48:18 jmatthew Exp $ */
+/* $OpenBSD: dwc2_hcdintr.c,v 1.7 2017/02/12 17:41:17 visa Exp $ */
/* $NetBSD: dwc2_hcdintr.c,v 1.11 2014/11/24 10:14:14 skrll Exp $ */
/*
@@ -2091,7 +2091,7 @@ irqreturn_t dwc2_handle_hcd_intr(struct dwc2_hsotg *hsotg)
return retval;
}
- KASSERT(mtx_owned(&hsotg->lock));
+ MUTEX_ASSERT_LOCKED(&hsotg->lock);
/* Check if HOST Mode */
if (dwc2_is_host_mode(hsotg)) {
diff --git a/sys/dev/usb/dwc2/dwc2var.h b/sys/dev/usb/dwc2/dwc2var.h
index d701ebccead..8d5c6aec44b 100644
--- a/sys/dev/usb/dwc2/dwc2var.h
+++ b/sys/dev/usb/dwc2/dwc2var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2var.h,v 1.17 2016/09/24 12:59:42 kettenis Exp $ */
+/* $OpenBSD: dwc2var.h,v 1.18 2017/02/12 17:41:17 visa Exp $ */
/* $NetBSD: dwc2var.h,v 1.3 2013/10/22 12:57:40 skrll Exp $ */
/*-
@@ -142,8 +142,6 @@ dwc2_root_intr(dwc2_softc_t *sc)
// XXX compat
-#define mtx_owned(x) ((void)(x), 1)
-
#define ENOSR 90
#define EPROTO 96