Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb ucom(4): Simplify logic fixing PR kern/57259.
details: https://anonhg.NetBSD.org/src/rev/a58e7bdc7788
branches: trunk
changeset: 373844:a58e7bdc7788
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Mar 05 23:28:54 2023 +0000
description:
ucom(4): Simplify logic fixing PR kern/57259.
cv_timedwait only ever returns 0 or EWOULDBLOCK, so this would always
return ERESTART anyway.
No functional change intended.
diffstat:
sys/dev/usb/ucom.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (35 lines):
diff -r c6f7aa3915eb -r a58e7bdc7788 sys/dev/usb/ucom.c
--- a/sys/dev/usb/ucom.c Sun Mar 05 23:24:06 2023 +0000
+++ b/sys/dev/usb/ucom.c Sun Mar 05 23:28:54 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ucom.c,v 1.137 2023/03/05 13:49:12 thorpej Exp $ */
+/* $NetBSD: ucom.c,v 1.138 2023/03/05 23:28:54 riastradh Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.137 2023/03/05 13:49:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.138 2023/03/05 23:28:54 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -552,14 +552,10 @@
ms = MIN(INT_MAX - 1000, delta.tv_sec*1000);
ms += howmany(delta.tv_usec, 1000);
ticks = MAX(1, MIN(INT_MAX, mstohz(ms)));
- error = cv_timedwait(&sc->sc_statecv, &sc->sc_lock,
+ (void)cv_timedwait(&sc->sc_statecv, &sc->sc_lock,
ticks);
mutex_exit(&sc->sc_lock);
- /* The successful passage of time is not an error. */
- if (error == EWOULDBLOCK) {
- error = 0;
- }
- return error ? error : ERESTART;
+ return ERESTART;
}
timerclear(&sc->sc_hup_time);
}
Home |
Main Index |
Thread Index |
Old Index