Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb usbnet(9): Omit needless un->un_intr test in usb...
details: https://anonhg.NetBSD.org/src/rev/32724edd9411
branches: trunk
changeset: 369497:32724edd9411
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Aug 20 14:05:58 2022 +0000
description:
usbnet(9): Omit needless un->un_intr test in usbnet_pipe_intr.
un->un_intr can't change after attach, and we don't open the pipe if
it's null. So no need to test it.
diffstat:
sys/dev/usb/usbnet.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 425278076f96 -r 32724edd9411 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c Sat Aug 20 14:05:22 2022 +0000
+++ b/sys/dev/usb/usbnet.c Sat Aug 20 14:05:58 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbnet.c,v 1.99 2022/08/20 12:30:00 riastradh Exp $ */
+/* $NetBSD: usbnet.c,v 1.100 2022/08/20 14:05:58 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.99 2022/08/20 12:30:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.100 2022/08/20 14:05:58 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -458,9 +458,9 @@
USBNETHIST_FUNC();
struct usbnet * const un = priv;
struct usbnet_private * const unp = un->un_pri;
- struct usbnet_intr * const uni = un->un_intr;
+ struct usbnet_intr * const uni __unused = un->un_intr;
- if (uni == NULL || usbnet_isdying(un) || unp->unp_stopping ||
+ if (usbnet_isdying(un) || unp->unp_stopping ||
status == USBD_INVAL || status == USBD_NOT_STARTED ||
status == USBD_CANCELLED) {
USBNETHIST_CALLARGS("%jd: uni %#jx d/s %#jx status %#jx",
Home |
Main Index |
Thread Index |
Old Index