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: Simplify return of usbnet_init_r...
details: https://anonhg.NetBSD.org/src/rev/2fa82d5c3679
branches: trunk
changeset: 362550:2fa82d5c3679
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Mar 03 05:56:00 2022 +0000
description:
usbnet drivers: Simplify return of usbnet_init_rx_tx.
diffstat:
sys/dev/usb/if_cdce.c | 9 +++------
sys/dev/usb/if_udav.c | 10 ++++------
sys/dev/usb/if_upl.c | 9 +++------
sys/dev/usb/if_urndis.c | 7 +++----
4 files changed, 13 insertions(+), 22 deletions(-)
diffs (123 lines):
diff -r ace96a46154f -r 2fa82d5c3679 sys/dev/usb/if_cdce.c
--- a/sys/dev/usb/if_cdce.c Thu Mar 03 05:55:52 2022 +0000
+++ b/sys/dev/usb/if_cdce.c Thu Mar 03 05:56:00 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cdce.c,v 1.77 2022/03/03 05:55:52 riastradh Exp $ */
+/* $NetBSD: if_cdce.c,v 1.78 2022/03/03 05:56:00 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul%windriver.com@localhost>
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.77 2022/03/03 05:55:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.78 2022/03/03 05:56:00 riastradh Exp $");
#include <sys/param.h>
@@ -259,11 +259,8 @@
cdce_uno_init(struct ifnet *ifp)
{
struct usbnet *un = ifp->if_softc;
- int rv;
- rv = usbnet_init_rx_tx(un);
-
- return rv;
+ return usbnet_init_rx_tx(un);
}
static void
diff -r ace96a46154f -r 2fa82d5c3679 sys/dev/usb/if_udav.c
--- a/sys/dev/usb/if_udav.c Thu Mar 03 05:55:52 2022 +0000
+++ b/sys/dev/usb/if_udav.c Thu Mar 03 05:56:00 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_udav.c,v 1.94 2022/03/03 05:55:19 riastradh Exp $ */
+/* $NetBSD: if_udav.c,v 1.95 2022/03/03 05:56:00 riastradh Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.94 2022/03/03 05:55:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.95 2022/03/03 05:56:00 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -502,11 +502,9 @@
}
if (usbnet_isdying(un))
- rc = EIO;
- else
- rc = usbnet_init_rx_tx(un);
+ return EIO;
- return rc;
+ return usbnet_init_rx_tx(un);
}
static void
diff -r ace96a46154f -r 2fa82d5c3679 sys/dev/usb/if_upl.c
--- a/sys/dev/usb/if_upl.c Thu Mar 03 05:55:52 2022 +0000
+++ b/sys/dev/usb/if_upl.c Thu Mar 03 05:56:00 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_upl.c,v 1.73 2022/03/03 05:55:01 riastradh Exp $ */
+/* $NetBSD: if_upl.c,v 1.74 2022/03/03 05:56:00 riastradh Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.73 2022/03/03 05:55:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.74 2022/03/03 05:56:00 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -255,11 +255,8 @@
upl_uno_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
- int rv;
- rv = usbnet_init_rx_tx(un);
-
- return rv;
+ return usbnet_init_rx_tx(un);
}
static int
diff -r ace96a46154f -r 2fa82d5c3679 sys/dev/usb/if_urndis.c
--- a/sys/dev/usb/if_urndis.c Thu Mar 03 05:55:52 2022 +0000
+++ b/sys/dev/usb/if_urndis.c Thu Mar 03 05:56:00 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urndis.c,v 1.43 2022/03/03 05:55:52 riastradh Exp $ */
+/* $NetBSD: if_urndis.c,v 1.44 2022/03/03 05:56:00 riastradh Exp $ */
/* $OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */
/*
@@ -21,7 +21,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.43 2022/03/03 05:55:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.44 2022/03/03 05:56:00 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -877,9 +877,8 @@
error = urndis_init_un(ifp, un);
if (error)
return EIO; /* XXX */
- error = usbnet_init_rx_tx(un);
- return error;
+ return usbnet_init_rx_tx(un);
}
static int
Home |
Main Index |
Thread Index |
Old Index