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 drivers: Omit needless uno_init locked su...
details: https://anonhg.NetBSD.org/src/rev/f0fe6f5aa773
branches: trunk
changeset: 362526:f0fe6f5aa773
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Mar 03 05:52:35 2022 +0000
description:
usbnet drivers: Omit needless uno_init locked subroutines.
uno_init is now called with the core lock already held so there is no
need for a separate locked subroutine.
diffstat:
sys/dev/usb/if_aue.c | 16 +++-------------
sys/dev/usb/if_axe.c | 14 +++-----------
sys/dev/usb/if_axen.c | 14 +++-----------
sys/dev/usb/if_cue.c | 16 +++-------------
sys/dev/usb/if_kue.c | 16 +++-------------
sys/dev/usb/if_mos.c | 14 +++-----------
sys/dev/usb/if_mue.c | 16 +++-------------
sys/dev/usb/if_smsc.c | 13 ++-----------
sys/dev/usb/if_ure.c | 14 +++-----------
sys/dev/usb/if_url.c | 14 +++-----------
10 files changed, 29 insertions(+), 118 deletions(-)
diffs (truncated from 427 to 300 lines):
diff -r 7f11a4d5d7b5 -r f0fe6f5aa773 sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c Thu Mar 03 05:52:27 2022 +0000
+++ b/sys/dev/usb/if_aue.c Thu Mar 03 05:52:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.175 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_aue.c,v 1.176 2022/03/03 05:52:35 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.175 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.176 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -954,7 +954,7 @@
}
static int
-aue_init_locked(struct ifnet *ifp)
+aue_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
struct aue_softc *sc = usbnet_softc(un);
@@ -1000,16 +1000,6 @@
return rv;
}
-static int
-aue_uno_init(struct ifnet *ifp)
-{
- int rv;
-
- rv = aue_init_locked(ifp);
-
- return rv;
-}
-
static void
aue_uno_mcast(struct ifnet *ifp)
{
diff -r 7f11a4d5d7b5 -r f0fe6f5aa773 sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c Thu Mar 03 05:52:27 2022 +0000
+++ b/sys/dev/usb/if_axe.c Thu Mar 03 05:52:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axe.c,v 1.138 2022/03/03 05:52:20 riastradh Exp $ */
+/* $NetBSD: if_axe.c,v 1.139 2022/03/03 05:52:35 riastradh Exp $ */
/* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
/*
@@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.138 2022/03/03 05:52:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.139 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1210,7 +1210,7 @@
}
static int
-axe_init_locked(struct ifnet *ifp)
+axe_uno_init(struct ifnet *ifp)
{
AXEHIST_FUNC(); AXEHIST_CALLED();
struct usbnet * const un = ifp->if_softc;
@@ -1306,14 +1306,6 @@
return usbnet_init_rx_tx(un);
}
-static int
-axe_uno_init(struct ifnet *ifp)
-{
- int ret = axe_init_locked(ifp);
-
- return ret;
-}
-
static void
axe_uno_mcast(struct ifnet *ifp)
{
diff -r 7f11a4d5d7b5 -r f0fe6f5aa773 sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c Thu Mar 03 05:52:27 2022 +0000
+++ b/sys/dev/usb/if_axen.c Thu Mar 03 05:52:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axen.c,v 1.80 2022/03/03 05:51:44 riastradh Exp $ */
+/* $NetBSD: if_axen.c,v 1.81 2022/03/03 05:52:35 riastradh Exp $ */
/* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.80 2022/03/03 05:51:44 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.81 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -894,7 +894,7 @@
}
static int
-axen_init_locked(struct ifnet *ifp)
+axen_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
uint16_t rxmode;
@@ -932,14 +932,6 @@
return usbnet_init_rx_tx(un);
}
-static int
-axen_uno_init(struct ifnet *ifp)
-{
- int ret = axen_init_locked(ifp);
-
- return ret;
-}
-
static void
axen_uno_stop(struct ifnet *ifp, int disable)
{
diff -r 7f11a4d5d7b5 -r f0fe6f5aa773 sys/dev/usb/if_cue.c
--- a/sys/dev/usb/if_cue.c Thu Mar 03 05:52:27 2022 +0000
+++ b/sys/dev/usb/if_cue.c Thu Mar 03 05:52:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cue.c,v 1.96 2022/03/03 05:51:27 riastradh Exp $ */
+/* $NetBSD: if_cue.c,v 1.97 2022/03/03 05:52:35 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.96 2022/03/03 05:51:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.97 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -613,7 +613,7 @@
}
static int
-cue_init_locked(struct ifnet *ifp)
+cue_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
int i, ctl;
@@ -667,16 +667,6 @@
return usbnet_init_rx_tx(un);
}
-static int
-cue_uno_init(struct ifnet *ifp)
-{
- int rv;
-
- rv = cue_init_locked(ifp);
-
- return rv;
-}
-
static void
cue_uno_mcast(struct ifnet *ifp)
{
diff -r 7f11a4d5d7b5 -r f0fe6f5aa773 sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c Thu Mar 03 05:52:27 2022 +0000
+++ b/sys/dev/usb/if_kue.c Thu Mar 03 05:52:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_kue.c,v 1.109 2022/03/03 05:51:27 riastradh Exp $ */
+/* $NetBSD: if_kue.c,v 1.110 2022/03/03 05:52:35 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.109 2022/03/03 05:51:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.110 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -591,7 +591,7 @@
}
static int
-kue_init_locked(struct ifnet *ifp)
+kue_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
struct kue_softc *sc = usbnet_softc(un);
@@ -627,16 +627,6 @@
return usbnet_init_rx_tx(un);
}
-static int
-kue_uno_init(struct ifnet *ifp)
-{
- int rv;
-
- rv = kue_init_locked(ifp);
-
- return rv;
-}
-
static void
kue_uno_mcast(struct ifnet *ifp)
{
diff -r 7f11a4d5d7b5 -r f0fe6f5aa773 sys/dev/usb/if_mos.c
--- a/sys/dev/usb/if_mos.c Thu Mar 03 05:52:27 2022 +0000
+++ b/sys/dev/usb/if_mos.c Thu Mar 03 05:52:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mos.c,v 1.12 2022/03/03 05:51:27 riastradh Exp $ */
+/* $NetBSD: if_mos.c,v 1.13 2022/03/03 05:52:35 riastradh Exp $ */
/* $OpenBSD: if_mos.c,v 1.40 2019/07/07 06:40:10 kevlo Exp $ */
/*
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.12 2022/03/03 05:51:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.13 2022/03/03 05:52:35 riastradh Exp $");
#include <sys/param.h>
@@ -723,7 +723,7 @@
}
static int
-mos_init_locked(struct ifnet *ifp)
+mos_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
u_int8_t rxmode;
@@ -759,14 +759,6 @@
return usbnet_init_rx_tx(un);
}
-static int
-mos_uno_init(struct ifnet *ifp)
-{
- int ret = mos_init_locked(ifp);
-
- return ret;
-}
-
static void
mos_uno_mcast(struct ifnet *ifp)
{
diff -r 7f11a4d5d7b5 -r f0fe6f5aa773 sys/dev/usb/if_mue.c
--- a/sys/dev/usb/if_mue.c Thu Mar 03 05:52:27 2022 +0000
+++ b/sys/dev/usb/if_mue.c Thu Mar 03 05:52:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mue.c,v 1.69 2022/03/03 05:51:35 riastradh Exp $ */
+/* $NetBSD: if_mue.c,v 1.70 2022/03/03 05:52:35 riastradh Exp $ */
/* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */
/*
@@ -20,7 +20,7 @@
/* Driver for Microchip LAN7500/LAN7800 chipsets. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.69 2022/03/03 05:51:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.70 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1223,7 +1223,7 @@
}
static int
-mue_init_locked(struct ifnet *ifp)
+mue_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
@@ -1254,16 +1254,6 @@
}
static int
-mue_uno_init(struct ifnet *ifp)
-{
- int rv;
-
- rv = mue_init_locked(ifp);
-
- return rv;
-}
-
-static int
mue_uno_ioctl(struct ifnet *ifp, u_long cmd, void *data)
Home |
Main Index |
Thread Index |
Old Index