Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb remove unused structure members. this brings mo...



details:   https://anonhg.NetBSD.org/src/rev/d7cb8c4c9280
branches:  trunk
changeset: 1000291:d7cb8c4c9280
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jul 21 10:27:56 2019 +0000

description:
remove unused structure members.  this brings most <foo>_chain and
<foo>_cdata structures into being identical for usb ethernet drivers.

upl(4) and url(4) need more work.

diffstat:

 sys/dev/usb/if_auereg.h  |  4 +---
 sys/dev/usb/if_axe.c     |  6 ++----
 sys/dev/usb/if_cdce.c    |  6 ++----
 sys/dev/usb/if_cuereg.h  |  4 +---
 sys/dev/usb/if_kuereg.h  |  4 +---
 sys/dev/usb/if_udavreg.h |  4 +---
 sys/dev/usb/if_upl.c     |  9 ++-------
 sys/dev/usb/if_url.c     |  6 ++----
 sys/dev/usb/if_urlreg.h  |  5 +----
 9 files changed, 13 insertions(+), 35 deletions(-)

diffs (244 lines):

diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_auereg.h
--- a/sys/dev/usb/if_auereg.h   Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_auereg.h   Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_auereg.h,v 1.28 2019/03/05 08:25:03 msaitoh Exp $   */
+/*     $NetBSD: if_auereg.h,v 1.29 2019/07/21 10:27:56 mrg Exp $       */
 /*
  * Copyright (c) 1997, 1998, 1999
  *     Bill Paul <wpaul%ee.columbia.edu@localhost>.  All rights reserved.
@@ -220,9 +220,7 @@
        struct aue_chain        aue_rx_chain[AUE_RX_LIST_CNT];
        struct aue_intrpkt      aue_ibuf;
        int                     aue_tx_prod;
-       int                     aue_tx_cons;
        int                     aue_tx_cnt;
-       int                     aue_rx_prod;
 };
 
 struct aue_softc {
diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c      Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_axe.c      Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axe.c,v 1.101 2019/07/21 09:38:28 mrg Exp $ */
+/*     $NetBSD: if_axe.c,v 1.102 2019/07/21 10:27:56 mrg 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.101 2019/07/21 09:38:28 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.102 2019/07/21 10:27:56 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -144,9 +144,7 @@
        struct axe_chain        axe_tx_chain[AXE_TX_LIST_CNT];
        struct axe_chain        axe_rx_chain[AXE_RX_LIST_CNT];
        int                     axe_tx_prod;
-       int                     axe_tx_cons;
        int                     axe_tx_cnt;
-       int                     axe_rx_prod;
 };
 
 struct axe_softc {
diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_cdce.c
--- a/sys/dev/usb/if_cdce.c     Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_cdce.c     Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cdce.c,v 1.52 2019/06/29 07:46:19 skrll Exp $ */
+/*     $NetBSD: if_cdce.c,v 1.53 2019/07/21 10:27:56 mrg Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul%windriver.com@localhost>
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.52 2019/06/29 07:46:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.53 2019/07/21 10:27:56 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -100,9 +100,7 @@
        struct cdce_chain        cdce_rx_chain[CDCE_RX_LIST_CNT];
        struct cdce_chain        cdce_tx_chain[CDCE_TX_LIST_CNT];
        int                      cdce_tx_prod;
-       int                      cdce_tx_cons;
        int                      cdce_tx_cnt;
-       int                      cdce_rx_prod;
 };
 
 struct cdce_softc {
diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_cuereg.h
--- a/sys/dev/usb/if_cuereg.h   Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_cuereg.h   Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cuereg.h,v 1.21 2019/03/05 08:25:03 msaitoh Exp $   */
+/*     $NetBSD: if_cuereg.h,v 1.22 2019/07/21 10:27:56 mrg Exp $       */
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *     Bill Paul <wpaul%ee.columbia.edu@localhost>.  All rights reserved.
@@ -159,9 +159,7 @@
        struct cue_chain        cue_tx_chain[CUE_TX_LIST_CNT];
        struct cue_chain        cue_rx_chain[CUE_RX_LIST_CNT];
        int                     cue_tx_prod;
-       int                     cue_tx_cons;
        int                     cue_tx_cnt;
-       int                     cue_rx_prod;
 };
 
 struct cue_softc {
diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_kuereg.h
--- a/sys/dev/usb/if_kuereg.h   Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_kuereg.h   Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_kuereg.h,v 1.21 2019/03/05 08:25:03 msaitoh Exp $   */
+/*     $NetBSD: if_kuereg.h,v 1.22 2019/07/21 10:27:56 mrg Exp $       */
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *     Bill Paul <wpaul%ee.columbia.edu@localhost>.  All rights reserved.
@@ -154,9 +154,7 @@
        struct kue_chain        kue_tx_chain[KUE_TX_LIST_CNT];
        struct kue_chain        kue_rx_chain[KUE_RX_LIST_CNT];
        int                     kue_tx_prod;
-       int                     kue_tx_cons;
        int                     kue_tx_cnt;
-       int                     kue_rx_prod;
 };
 
 struct kue_softc {
diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_udavreg.h
--- a/sys/dev/usb/if_udavreg.h  Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_udavreg.h  Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_udavreg.h,v 1.12 2019/03/05 08:25:03 msaitoh Exp $  */
+/*     $NetBSD: if_udavreg.h,v 1.13 2019/07/21 10:27:56 mrg Exp $      */
 /*     $nabe: if_udavreg.h,v 1.2 2003/08/21 16:26:40 nabe Exp $        */
 /*
  * Copyright (c) 2003
@@ -160,9 +160,7 @@
        struct udav_intrpkg     udav_ibuf;
 #endif
        int                     udav_tx_prod;
-       int                     udav_tx_cons;
        int                     udav_tx_cnt;
-       int                     udav_rx_prod;
 };
 
 struct udav_softc {
diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_upl.c
--- a/sys/dev/usb/if_upl.c      Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_upl.c      Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_upl.c,v 1.63 2019/05/05 03:17:54 mrg Exp $  */
+/*     $NetBSD: if_upl.c,v 1.64 2019/07/21 10:27:56 mrg Exp $  */
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.63 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.64 2019/07/21 10:27:56 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -117,16 +117,13 @@
        struct usbd_xfer        *upl_xfer;
        char                    *upl_buf;
        struct mbuf             *upl_mbuf;
-       int                     upl_idx;
 };
 
 struct upl_cdata {
        struct upl_chain        upl_tx_chain[UPL_TX_LIST_CNT];
        struct upl_chain        upl_rx_chain[UPL_RX_LIST_CNT];
        int                     upl_tx_prod;
-       int                     upl_tx_cons;
        int                     upl_tx_cnt;
-       int                     upl_rx_prod;
 };
 
 struct upl_softc {
@@ -437,7 +434,6 @@
        for (i = 0; i < UPL_RX_LIST_CNT; i++) {
                c = &cd->upl_rx_chain[i];
                c->upl_sc = sc;
-               c->upl_idx = i;
                if (upl_newbuf(sc, c, NULL) == ENOBUFS)
                        return ENOBUFS;
                if (c->upl_xfer == NULL) {
@@ -465,7 +461,6 @@
        for (i = 0; i < UPL_TX_LIST_CNT; i++) {
                c = &cd->upl_tx_chain[i];
                c->upl_sc = sc;
-               c->upl_idx = i;
                c->upl_mbuf = NULL;
                if (c->upl_xfer == NULL) {
                        int error = usbd_create_xfer(sc->sc_ep[UPL_ENDPT_TX],
diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_url.c
--- a/sys/dev/usb/if_url.c      Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_url.c      Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_url.c,v 1.65 2019/05/28 07:41:50 msaitoh Exp $      */
+/*     $NetBSD: if_url.c,v 1.66 2019/07/21 10:27:56 mrg Exp $  */
 
 /*
  * Copyright (c) 2001, 2002
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.65 2019/05/28 07:41:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.66 2019/07/21 10:27:56 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -822,7 +822,6 @@
        for (i = 0; i < URL_RX_LIST_CNT; i++) {
                c = &cd->url_rx_chain[i];
                c->url_sc = sc;
-               c->url_idx = i;
                if (url_newbuf(sc, c, NULL) == ENOBUFS)
                        return ENOBUFS;
                if (c->url_xfer == NULL) {
@@ -850,7 +849,6 @@
        for (i = 0; i < URL_TX_LIST_CNT; i++) {
                c = &cd->url_tx_chain[i];
                c->url_sc = sc;
-               c->url_idx = i;
                c->url_mbuf = NULL;
                if (c->url_xfer == NULL) {
                        int error = usbd_create_xfer(sc->sc_pipe_tx, URL_BUFSZ,
diff -r dc55e0f1e039 -r d7cb8c4c9280 sys/dev/usb/if_urlreg.h
--- a/sys/dev/usb/if_urlreg.h   Sun Jul 21 09:38:28 2019 +0000
+++ b/sys/dev/usb/if_urlreg.h   Sun Jul 21 10:27:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_urlreg.h,v 1.12 2019/03/05 08:25:03 msaitoh Exp $   */
+/*     $NetBSD: if_urlreg.h,v 1.13 2019/07/21 10:27:56 mrg Exp $       */
 /*
  * Copyright (c) 2001, 2002
  *     Shingo WATANABE <nabe%nabechan.org@localhost>.  All rights reserved.
@@ -135,7 +135,6 @@
        struct usbd_xfer        *url_xfer;
        char                    *url_buf;
        struct mbuf             *url_mbuf;
-       int                     url_idx;
 };
 
 struct url_cdata {
@@ -146,9 +145,7 @@
        struct url_intrpkg      url_ibuf;
 #endif
        int                     url_tx_prod;
-       int                     url_tx_cons;
        int                     url_tx_cnt;
-       int                     url_rx_prod;
 };
 
 struct url_softc {



Home | Main Index | Thread Index | Old Index