Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Remove written-only sk_next member of struct (m)...



details:   https://anonhg.NetBSD.org/src/rev/e38b8a9b2806
branches:  trunk
changeset: 971517:e38b8a9b2806
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sun Apr 26 16:14:14 2020 +0000

description:
Remove written-only sk_next member of struct (m)sk_chain.

diffstat:

 sys/dev/pci/if_msk.c    |  18 ++++--------------
 sys/dev/pci/if_mskvar.h |   3 +--
 2 files changed, 5 insertions(+), 16 deletions(-)

diffs (74 lines):

diff -r be0a667f2e28 -r e38b8a9b2806 sys/dev/pci/if_msk.c
--- a/sys/dev/pci/if_msk.c      Sun Apr 26 15:49:10 2020 +0000
+++ b/sys/dev/pci/if_msk.c      Sun Apr 26 16:14:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.100 2020/04/22 14:26:27 jdolecek Exp $ */
+/* $NetBSD: if_msk.c,v 1.101 2020/04/26 16:14:14 jakllsch Exp $ */
 /*     $OpenBSD: if_msk.c,v 1.79 2009/10/15 17:54:56 deraadt Exp $     */
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.100 2020/04/22 14:26:27 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.101 2020/04/26 16:14:14 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -419,17 +419,12 @@
        struct msk_chain_data   *cd = &sc_if->sk_cdata;
        struct msk_ring_data    *rd = sc_if->sk_rdata;
        struct msk_rx_desc      *r;
-       int                     i, nexti;
+       int                     i;
 
        memset(rd->sk_rx_ring, 0, sizeof(struct msk_rx_desc) * MSK_RX_RING_CNT);
 
        for (i = 0; i < MSK_RX_RING_CNT; i++) {
                cd->sk_rx_chain[i].sk_le = &rd->sk_rx_ring[i];
-               if (i == (MSK_RX_RING_CNT - 1))
-                       nexti = 0;
-               else
-                       nexti = i + 1;
-               cd->sk_rx_chain[i].sk_next = &cd->sk_rx_chain[nexti];
        }
 
        sc_if->sk_cdata.sk_rx_prod = 0;
@@ -459,17 +454,12 @@
        struct msk_chain_data   *cd = &sc_if->sk_cdata;
        struct msk_ring_data    *rd = sc_if->sk_rdata;
        struct msk_tx_desc      *t;
-       int                     i, nexti;
+       int                     i;
 
        memset(rd->sk_tx_ring, 0, sizeof(struct msk_tx_desc) * MSK_TX_RING_CNT);
 
        for (i = 0; i < MSK_TX_RING_CNT; i++) {
                cd->sk_tx_chain[i].sk_le = &rd->sk_tx_ring[i];
-               if (i == (MSK_TX_RING_CNT - 1))
-                       nexti = 0;
-               else
-                       nexti = i + 1;
-               cd->sk_tx_chain[i].sk_next = &cd->sk_tx_chain[nexti];
        }
 
        sc_if->sk_cdata.sk_tx_prod = 0;
diff -r be0a667f2e28 -r e38b8a9b2806 sys/dev/pci/if_mskvar.h
--- a/sys/dev/pci/if_mskvar.h   Sun Apr 26 15:49:10 2020 +0000
+++ b/sys/dev/pci/if_mskvar.h   Sun Apr 26 16:14:14 2020 +0000
@@ -1,5 +1,5 @@
 /*     $OpenBSD: if_mskvar.h,v 1.3 2006/12/28 16:34:42 kettenis Exp $  */
-/*     $NetBSD: if_mskvar.h,v 1.22 2019/09/13 07:55:07 msaitoh Exp $   */
+/*     $NetBSD: if_mskvar.h,v 1.23 2020/04/26 16:14:14 jakllsch Exp $  */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -91,7 +91,6 @@
 struct sk_chain {
        void                    *sk_le;
        struct mbuf             *sk_mbuf;
-       struct sk_chain         *sk_next;
 };
 
 /*



Home | Main Index | Thread Index | Old Index