Module Name: src Committed By: riastradh Date: Sat Aug 20 14:05:58 UTC 2022
Modified Files: src/sys/dev/usb: usbnet.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/dev/usb/usbnet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/usbnet.c diff -u src/sys/dev/usb/usbnet.c:1.99 src/sys/dev/usb/usbnet.c:1.100 --- src/sys/dev/usb/usbnet.c:1.99 Sat Aug 20 12:30:00 2022 +++ src/sys/dev/usb/usbnet.c Sat Aug 20 14:05:58 2022 @@ -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 @@ usbnet_pipe_intr(struct usbd_xfer *xfer, 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",