Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb This was still not correct, . USB_DEBUG is what m...



details:   https://anonhg.NetBSD.org/src/rev/1dd0e376c373
branches:  trunk
changeset: 745977:1dd0e376c373
user:      kre <kre%NetBSD.org@localhost>
date:      Wed Mar 18 11:33:32 2020 +0000

description:
This was still not correct,. USB_DEBUG is what mattered, not AUE_DEBUG,
the two are orthogonal.

Just do it the way that should work, rather than trying to work out
what magic will allow a new variable to be defined so that it appears
exactly when it is needed and not otherwise.   The var isn't required,
just do without it.

diffstat:

 sys/dev/usb/if_aue.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (43 lines):

diff -r 5939275352bf -r 1dd0e376c373 sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c      Wed Mar 18 10:56:38 2020 +0000
+++ b/sys/dev/usb/if_aue.c      Wed Mar 18 11:33:32 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aue.c,v 1.170 2020/03/18 09:42:05 martin Exp $      */
+/*     $NetBSD: if_aue.c,v 1.171 2020/03/18 11:33:32 kre Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.170 2020/03/18 09:42:05 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.171 2020/03/18 11:33:32 kre Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -127,7 +127,7 @@
        aprint_error("%s: sysctl_createv failed (err = %d)\n", __func__, err);
 }
 
-#endif /* AXE_DEBUG */
+#endif /* AUE_DEBUG */
 #endif /* USB_DEBUG */
 
 #define DPRINTF(FMT,A,B,C,D)   USBHIST_LOGN(auedebug,1,FMT,A,B,C,D)
@@ -1012,13 +1012,11 @@
 static int
 aue_uno_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
-#ifdef AUE_DEBUG
-       struct usbnet * const   un = ifp->if_softc;
-#endif
 
        AUEHIST_FUNC();
        AUEHIST_CALLARGSN(5, "aue%jd: enter cmd %#jx data %#jx",
-           device_unit(un->un_dev), cmd, (uintptr_t)data, 0);
+           device_unit(((struct usbnet *)(ifp->if_softc))->un_dev),
+           cmd, (uintptr_t)data, 0);
 
        switch (cmd) {
        case SIOCADDMULTI:



Home | Main Index | Thread Index | Old Index