summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-03-03 05:52:35 +0000
committerriastradh <riastradh@NetBSD.org>2022-03-03 05:52:35 +0000
commitd7fcdbca218f79e52d16ff2585334808f13a4ddb (patch)
tree20ade1429510859d1a57d4c7ccdc4c183758db14 /sys/dev/usb
parent3387983ecf4260a43bade500c32c67bc51aa9d95 (diff)
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 (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_aue.c16
-rw-r--r--sys/dev/usb/if_axe.c14
-rw-r--r--sys/dev/usb/if_axen.c14
-rw-r--r--sys/dev/usb/if_cue.c16
-rw-r--r--sys/dev/usb/if_kue.c16
-rw-r--r--sys/dev/usb/if_mos.c14
-rw-r--r--sys/dev/usb/if_mue.c16
-rw-r--r--sys/dev/usb/if_smsc.c13
-rw-r--r--sys/dev/usb/if_ure.c14
-rw-r--r--sys/dev/usb/if_url.c14
10 files changed, 29 insertions, 118 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index c6b7e210193..4be9ee2a6f8 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -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 @@ aue_uno_tx_prepare(struct usbnet *un, struct mbuf *m, struct usbnet_chain *c)
}
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 @@ aue_init_locked(struct ifnet *ifp)
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 --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index 04f1c0b4f8e..9a31875f7e4 100644
--- a/sys/dev/usb/if_axe.c
+++ b/sys/dev/usb/if_axe.c
@@ -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 @@ axe_csum_cfg(struct axe_softc *sc)
}
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 @@ axe_init_locked(struct ifnet *ifp)
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 --git a/sys/dev/usb/if_axen.c b/sys/dev/usb/if_axen.c
index 41705c376c7..18fb2337a21 100644
--- a/sys/dev/usb/if_axen.c
+++ b/sys/dev/usb/if_axen.c
@@ -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 @@ axen_uno_tx_prepare(struct usbnet *un, struct mbuf *m, struct usbnet_chain *c)
}
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 @@ axen_init_locked(struct ifnet *ifp)
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 --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 3f9d42dcf6f..dc1aad04d2c 100644
--- a/sys/dev/usb/if_cue.c
+++ b/sys/dev/usb/if_cue.c
@@ -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 @@ cue_uno_tx_prepare(struct usbnet *un, struct mbuf *m, struct usbnet_chain *c)
}
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 @@ cue_init_locked(struct ifnet *ifp)
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 --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 53ec761d293..4b2b77a9f5e 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -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 @@ kue_uno_tx_prepare(struct usbnet *un, struct mbuf *m, struct usbnet_chain *c)
}
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 @@ kue_init_locked(struct ifnet *ifp)
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 --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c
index b90062d7ddd..b1528b3a8b9 100644
--- a/sys/dev/usb/if_mos.c
+++ b/sys/dev/usb/if_mos.c
@@ -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 @@ mos_uno_tx_prepare(struct usbnet *un, struct mbuf *m, struct usbnet_chain *c)
}
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 @@ mos_init_locked(struct ifnet *ifp)
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 --git a/sys/dev/usb/if_mue.c b/sys/dev/usb/if_mue.c
index fe2b4d9ef36..14ca350c499 100644
--- a/sys/dev/usb/if_mue.c
+++ b/sys/dev/usb/if_mue.c
@@ -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 @@ mue_uno_rx_loop(struct usbnet *un, struct usbnet_chain *c, uint32_t total_len)
}
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 @@ mue_init_locked(struct ifnet *ifp)
}
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)
{
struct usbnet * const un = ifp->if_softc;
diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c
index a9343feb429..82a04caa3c0 100644
--- a/sys/dev/usb/if_smsc.c
+++ b/sys/dev/usb/if_smsc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.78 2022/03/03 05:51:44 riastradh Exp $ */
+/* $NetBSD: if_smsc.c,v 1.79 2022/03/03 05:52:35 riastradh Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.78 2022/03/03 05:51:44 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.79 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -174,7 +174,6 @@ static int smsc_chip_init(struct usbnet *);
static int smsc_setmacaddress(struct usbnet *, const uint8_t *);
static int smsc_uno_init(struct ifnet *);
-static int smsc_init_locked(struct ifnet *);
static void smsc_uno_stop(struct ifnet *, int);
static void smsc_reset(struct smsc_softc *);
@@ -554,14 +553,6 @@ smsc_reset(struct smsc_softc *sc)
static int
smsc_uno_init(struct ifnet *ifp)
{
- int ret = smsc_init_locked(ifp);
-
- return ret;
-}
-
-static int
-smsc_init_locked(struct ifnet *ifp)
-{
struct usbnet * const un = ifp->if_softc;
struct smsc_softc * const sc = usbnet_softc(un);
diff --git a/sys/dev/usb/if_ure.c b/sys/dev/usb/if_ure.c
index 34620f7431a..56f5ea81810 100644
--- a/sys/dev/usb/if_ure.c
+++ b/sys/dev/usb/if_ure.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ure.c,v 1.45 2022/03/03 05:51:27 riastradh Exp $ */
+/* $NetBSD: if_ure.c,v 1.46 2022/03/03 05:52:35 riastradh Exp $ */
/* $OpenBSD: if_ure.c,v 1.10 2018/11/02 21:32:30 jcs Exp $ */
/*-
@@ -30,7 +30,7 @@
/* RealTek RTL8152/RTL8153 10/100/Gigabit USB Ethernet device */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.45 2022/03/03 05:51:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.46 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -408,7 +408,7 @@ ure_reset(struct usbnet *un)
}
static int
-ure_init_locked(struct ifnet *ifp)
+ure_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
uint8_t eaddr[8];
@@ -453,14 +453,6 @@ ure_init_locked(struct ifnet *ifp)
return usbnet_init_rx_tx(un);
}
-static int
-ure_uno_init(struct ifnet *ifp)
-{
- int ret = ure_init_locked(ifp);
-
- return ret;
-}
-
static void
ure_uno_stop(struct ifnet *ifp, int disable __unused)
{
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index 01011e6c7e8..e21e8ee3388 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_url.c,v 1.84 2022/03/03 05:51:44 riastradh Exp $ */
+/* $NetBSD: if_url.c,v 1.85 2022/03/03 05:52:35 riastradh Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.84 2022/03/03 05:51:44 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.85 2022/03/03 05:52:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -363,7 +363,7 @@ url_csr_write_4(struct usbnet *un, int reg, int aval)
}
static int
-url_init_locked(struct ifnet *ifp)
+url_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
const u_char *eaddr;
@@ -401,14 +401,6 @@ url_init_locked(struct ifnet *ifp)
return usbnet_init_rx_tx(un);
}
-static int
-url_uno_init(struct ifnet *ifp)
-{
- int ret = url_init_locked(ifp);
-
- return ret;
-}
-
static void
url_reset(struct usbnet *un)
{