net: Remove unnecessary driver assignments of ethtool_ringparam fields to zero
authorRick Jones <rick.jones2@hp.com>
Fri, 7 Oct 2011 23:13:28 +0000 (19:13 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Oct 2011 23:13:28 +0000 (19:13 -0400)
Per comments from Ben Hutchings on a previous patch, sweep the floors
a little removing unnecessary assignments of zero to fields of struct
ethtool_ringparam in driver code supporting ethtool -g.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
26 files changed:
drivers/net/ethernet/3com/typhoon.c
drivers/net/ethernet/atheros/atlx/atl1.c
drivers/net/ethernet/broadcom/bcm63xx_enet.c
drivers/net/ethernet/broadcom/bnx2.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/brocade/bna/bnad_ethtool.c
drivers/net/ethernet/chelsio/cxgb/cxgb2.c
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
drivers/net/ethernet/intel/e100.c
drivers/net/ethernet/intel/e1000/e1000_ethtool.c
drivers/net/ethernet/intel/e1000e/ethtool.c
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igbvf/ethtool.c
drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/intel/ixgbevf/ethtool.c
drivers/net/ethernet/marvell/mv643xx_eth.c
drivers/net/ethernet/marvell/skge.c
drivers/net/ethernet/marvell/sky2.c
drivers/net/ethernet/neterion/s2io.c
drivers/net/ethernet/nvidia/forcedeth.c
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c
drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
drivers/net/ethernet/sfc/ethtool.c

index 607c09e3dc8011bac49d6b9b0f96f56c89c619b9..11f8858c786d13e4b1edf5f073a3de874e8720f9 100644 (file)
@@ -1148,13 +1148,9 @@ static void
 typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
 {
        ering->rx_max_pending = RXENT_ENTRIES;
-       ering->rx_mini_max_pending = 0;
-       ering->rx_jumbo_max_pending = 0;
        ering->tx_max_pending = TXLO_ENTRIES - 1;
 
        ering->rx_pending = RXENT_ENTRIES;
-       ering->rx_mini_pending = 0;
-       ering->rx_jumbo_pending = 0;
        ering->tx_pending = TXLO_ENTRIES - 1;
 }
 
index 43511ab8dd2741541c905b698f5050e5618f7aa3..7381a49fefb49adeff6aa90a612f58ebc1af2728 100644 (file)
@@ -3473,12 +3473,8 @@ static void atl1_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = ATL1_MAX_RFD;
        ring->tx_max_pending = ATL1_MAX_TPD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rxdr->count;
        ring->tx_pending = txdr->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int atl1_set_ringparam(struct net_device *netdev,
index 05b02286607623e37e8b8b4e65c1c32d34bfd567..a11a8ad94226d3127ab25dfa17fdd54c70da2ba0 100644 (file)
@@ -1398,8 +1398,6 @@ static void bcm_enet_get_ringparam(struct net_device *dev,
        /* rx/tx ring is actually only limited by memory */
        ering->rx_max_pending = 8192;
        ering->tx_max_pending = 8192;
-       ering->rx_mini_max_pending = 0;
-       ering->rx_jumbo_max_pending = 0;
        ering->rx_pending = priv->rx_ring_size;
        ering->tx_pending = priv->tx_ring_size;
 }
index ad24d8c0b8a72ba30e691ff2121ea0cd2079cd82..3c221be9d1e28526fc3d7f8ca4f7474f252df535 100644 (file)
@@ -7155,11 +7155,9 @@ bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
        struct bnx2 *bp = netdev_priv(dev);
 
        ering->rx_max_pending = MAX_TOTAL_RX_DESC_CNT;
-       ering->rx_mini_max_pending = 0;
        ering->rx_jumbo_max_pending = MAX_TOTAL_RX_PG_DESC_CNT;
 
        ering->rx_pending = bp->rx_ring_size;
-       ering->rx_mini_pending = 0;
        ering->rx_jumbo_pending = bp->rx_pg_ring_size;
 
        ering->tx_max_pending = MAX_TX_DESC_CNT;
index a49f8cfa2dc675cb761d712f13a588725e754355..1a6e37ce730c4deeecd119b0740da0bbed6a599b 100644 (file)
@@ -1344,17 +1344,12 @@ static void bnx2x_get_ringparam(struct net_device *dev,
        struct bnx2x *bp = netdev_priv(dev);
 
        ering->rx_max_pending = MAX_RX_AVAIL;
-       ering->rx_mini_max_pending = 0;
-       ering->rx_jumbo_max_pending = 0;
 
        if (bp->rx_ring_size)
                ering->rx_pending = bp->rx_ring_size;
        else
                ering->rx_pending = MAX_RX_AVAIL;
 
-       ering->rx_mini_pending = 0;
-       ering->rx_jumbo_pending = 0;
-
        ering->tx_max_pending = MAX_TX_AVAIL;
        ering->tx_pending = bp->tx_ring_size;
 }
index 9dbd1af6653c17cbf2d28356c2ecf6488df6727d..fe712f955110cec929cc13ecb0b5670467d54eee 100644 (file)
@@ -10514,7 +10514,6 @@ static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *
        struct tg3 *tp = netdev_priv(dev);
 
        ering->rx_max_pending = tp->rx_std_ring_mask;
-       ering->rx_mini_max_pending = 0;
        if (tg3_flag(tp, JUMBO_RING_ENABLE))
                ering->rx_jumbo_max_pending = tp->rx_jmb_ring_mask;
        else
@@ -10523,7 +10522,6 @@ static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *
        ering->tx_max_pending = TG3_TX_RING_SIZE - 1;
 
        ering->rx_pending = tp->rx_pending;
-       ering->rx_mini_pending = 0;
        if (tg3_flag(tp, JUMBO_RING_ENABLE))
                ering->rx_jumbo_pending = tp->rx_jumbo_pending;
        else
index ac6b49561bf03e3d8910fee32fb319b41a6b223a..fd3dcc1e91453d24db9c8a0b9a6779c8046536f3 100644 (file)
@@ -419,13 +419,9 @@ bnad_get_ringparam(struct net_device *netdev,
        struct bnad *bnad = netdev_priv(netdev);
 
        ringparam->rx_max_pending = BNAD_MAX_RXQ_DEPTH;
-       ringparam->rx_mini_max_pending = 0;
-       ringparam->rx_jumbo_max_pending = 0;
        ringparam->tx_max_pending = BNAD_MAX_TXQ_DEPTH;
 
        ringparam->rx_pending = bnad->rxq_depth;
-       ringparam->rx_mini_max_pending = 0;
-       ringparam->rx_jumbo_max_pending = 0;
        ringparam->tx_pending = bnad->txq_depth;
 }
 
index 9993f4f1543325e508957869513919bb4815866a..ca26d97171bddda55a642d330e24f1b43160cc7d 100644 (file)
@@ -712,12 +712,10 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
        int jumbo_fl = t1_is_T1B(adapter) ? 1 : 0;
 
        e->rx_max_pending = MAX_RX_BUFFERS;
-       e->rx_mini_max_pending = 0;
        e->rx_jumbo_max_pending = MAX_RX_JUMBO_BUFFERS;
        e->tx_max_pending = MAX_CMDQ_ENTRIES;
 
        e->rx_pending = adapter->params.sge.freelQ_size[!jumbo_fl];
-       e->rx_mini_pending = 0;
        e->rx_jumbo_pending = adapter->params.sge.freelQ_size[jumbo_fl];
        e->tx_pending = adapter->params.sge.cmdQ_size[0];
 }
index 29e0e4243231687246427239a7e9be65da65694c..4d15c8f99c3b8911d4f9ec71c61b4be40988379c 100644 (file)
@@ -1898,7 +1898,6 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
        const struct qset_params *q = &adapter->params.sge.qset[pi->first_qset];
 
        e->rx_max_pending = MAX_RX_BUFFERS;
-       e->rx_mini_max_pending = 0;
        e->rx_jumbo_max_pending = MAX_RX_JUMBO_BUFFERS;
        e->tx_max_pending = MAX_TXQ_ENTRIES;
 
index fe87d3eea5edf8e64302e20692845f30275fb718..ae17cd1a907fb80749227cb79f6c6c407a5fc3be 100644 (file)
@@ -2502,12 +2502,8 @@ static void e100_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = rfds->max;
        ring->tx_max_pending = cbs->max;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rfds->count;
        ring->tx_pending = cbs->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int e100_set_ringparam(struct net_device *netdev,
index 5548d464261a6173fc1be5588960d858b33e8592..2b223ac99c421c9a6413e06f996ca4efc2f45a7a 100644 (file)
@@ -540,12 +540,8 @@ static void e1000_get_ringparam(struct net_device *netdev,
                E1000_MAX_82544_RXD;
        ring->tx_max_pending = (mac_type < e1000_82544) ? E1000_MAX_TXD :
                E1000_MAX_82544_TXD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rxdr->count;
        ring->tx_pending = txdr->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int e1000_set_ringparam(struct net_device *netdev,
index d96d0b0e08cf7b283ecb16eb15affaefc03a6402..69c9d2199140a94b4f754bdc1fc43d93bd00b6ea 100644 (file)
@@ -612,12 +612,8 @@ static void e1000_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = E1000_MAX_RXD;
        ring->tx_max_pending = E1000_MAX_TXD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rx_ring->count;
        ring->tx_pending = tx_ring->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int e1000_set_ringparam(struct net_device *netdev,
index f227fc57eb11b16dd60bc083ca70463b1350378f..174540f262d7e2731fbfc8f3389a77cb109cc7b0 100644 (file)
@@ -705,12 +705,8 @@ static void igb_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = IGB_MAX_RXD;
        ring->tx_max_pending = IGB_MAX_TXD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = adapter->rx_ring_count;
        ring->tx_pending = adapter->tx_ring_count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int igb_set_ringparam(struct net_device *netdev,
index b0b14d63dfbf391c10b1ba1905a7f6aee7e6d929..0ee8b684584676934c46154f5fc07dc89374193c 100644 (file)
@@ -259,12 +259,8 @@ static void igbvf_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = IGBVF_MAX_RXD;
        ring->tx_max_pending = IGBVF_MAX_TXD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rx_ring->count;
        ring->tx_pending = tx_ring->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int igbvf_set_ringparam(struct net_device *netdev,
index ab404e71f86a96f1b4ae4bea0687268b32a5f667..9dfce7dff79b8e54c8c710e33f9b7ce1f503b7ea 100644 (file)
@@ -492,12 +492,8 @@ ixgb_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = MAX_RXD;
        ring->tx_max_pending = MAX_TXD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rxdr->count;
        ring->tx_pending = txdr->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int
index 10ea29f66405103dd86f4068d3d4eef77edee2ba..18520cef3e947da88c82cfb727613f38b5522fd5 100644 (file)
@@ -846,12 +846,8 @@ static void ixgbe_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = IXGBE_MAX_RXD;
        ring->tx_max_pending = IXGBE_MAX_TXD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rx_ring->count;
        ring->tx_pending = tx_ring->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int ixgbe_set_ringparam(struct net_device *netdev,
index e1d9e3b634480e67369ab676e43e3c691f00aea0..e29ba4506b74d4a3605e74bcb10f9262fb70c452 100644 (file)
@@ -281,12 +281,8 @@ static void ixgbevf_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = IXGBEVF_MAX_RXD;
        ring->tx_max_pending = IXGBEVF_MAX_TXD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rx_ring->count;
        ring->tx_pending = tx_ring->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int ixgbevf_set_ringparam(struct net_device *netdev,
index 7325737fe93b86340b36507939382a75e1934957..f6821aa5ffbffcb0ea3eb5c4e678b563f3fb9571 100644 (file)
@@ -1547,13 +1547,9 @@ mv643xx_eth_get_ringparam(struct net_device *dev, struct ethtool_ringparam *er)
 
        er->rx_max_pending = 4096;
        er->tx_max_pending = 4096;
-       er->rx_mini_max_pending = 0;
-       er->rx_jumbo_max_pending = 0;
 
        er->rx_pending = mp->rx_ring_size;
        er->tx_pending = mp->tx_ring_size;
-       er->rx_mini_pending = 0;
-       er->rx_jumbo_pending = 0;
 }
 
 static int
index 32db4c877ff1c313cb97e6e87f91b26d391281dc..297730359b796aa4f792ee0d76626e0f540064ee 100644 (file)
@@ -497,13 +497,9 @@ static void skge_get_ring_param(struct net_device *dev,
 
        p->rx_max_pending = MAX_RX_RING_SIZE;
        p->tx_max_pending = MAX_TX_RING_SIZE;
-       p->rx_mini_max_pending = 0;
-       p->rx_jumbo_max_pending = 0;
 
        p->rx_pending = skge->rx_ring.count;
        p->tx_pending = skge->tx_ring.count;
-       p->rx_mini_pending = 0;
-       p->rx_jumbo_pending = 0;
 }
 
 static int skge_set_ring_param(struct net_device *dev,
index a3ce9b6d36afe02488bbdb530305f7235e42ec0e..6895e3be260c865fbbf31da1f4b2017b0d5b9010 100644 (file)
@@ -4088,13 +4088,9 @@ static void sky2_get_ringparam(struct net_device *dev,
        struct sky2_port *sky2 = netdev_priv(dev);
 
        ering->rx_max_pending = RX_MAX_PENDING;
-       ering->rx_mini_max_pending = 0;
-       ering->rx_jumbo_max_pending = 0;
        ering->tx_max_pending = TX_MAX_PENDING;
 
        ering->rx_pending = sky2->rx_pending;
-       ering->rx_mini_pending = 0;
-       ering->rx_jumbo_pending = 0;
        ering->tx_pending = sky2->tx_pending;
 }
 
index 4ec7e3f46cc6d739dc27c43d54da1d5274a145e8..bdd3e6a330cd3a96f88e7c768b76821b6852bb4c 100644 (file)
@@ -5522,14 +5522,12 @@ static void s2io_ethtool_gringparam(struct net_device *dev,
                ering->rx_jumbo_max_pending = MAX_RX_DESC_2;
        }
 
-       ering->rx_mini_max_pending = 0;
        ering->tx_max_pending = MAX_TX_DESC;
 
        for (i = 0; i < sp->config.rx_ring_num; i++)
                rx_desc_count += sp->config.rx_cfg[i].num_rxd;
        ering->rx_pending = rx_desc_count;
        ering->rx_jumbo_pending = rx_desc_count;
-       ering->rx_mini_pending = 0;
 
        for (i = 0; i < sp->config.tx_fifo_num; i++)
                tx_desc_count += sp->config.tx_cfg[i].fifo_len;
index 84baa59430bb6676ac5cf2b3761171af2e26e760..d7763ab841d848e481a800276d4ef60efeeeb551 100644 (file)
@@ -4280,13 +4280,9 @@ static void nv_get_ringparam(struct net_device *dev, struct ethtool_ringparam* r
        struct fe_priv *np = netdev_priv(dev);
 
        ring->rx_max_pending = (np->desc_ver == DESC_VER_1) ? RING_MAX_DESC_VER_1 : RING_MAX_DESC_VER_2_3;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->tx_max_pending = (np->desc_ver == DESC_VER_1) ? RING_MAX_DESC_VER_1 : RING_MAX_DESC_VER_2_3;
 
        ring->rx_pending = np->rx_ring_size;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
        ring->tx_pending = np->tx_ring_size;
 }
 
index ea2d8e41887a67a679d52a8d7f6e6962d1c42644..8c8027176bef98cb133b0aa5e7a03f30808df42f 100644 (file)
@@ -273,12 +273,8 @@ static void pch_gbe_get_ringparam(struct net_device *netdev,
 
        ring->rx_max_pending = PCH_GBE_MAX_RXD;
        ring->tx_max_pending = PCH_GBE_MAX_TXD;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = rxdr->count;
        ring->tx_pending = txdr->count;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 /**
index b34fb74d07e3b4f91ad027d914ab3b2fbd260a14..e09ea83b8c47efe7f7061e2f046b9a45b870b82e 100644 (file)
@@ -413,9 +413,6 @@ netxen_nic_get_ringparam(struct net_device *dev,
        }
 
        ring->tx_max_pending = MAX_CMD_DESCRIPTORS;
-
-       ring->rx_mini_max_pending = 0;
-       ring->rx_mini_pending = 0;
 }
 
 static u32
index 11f4df75e84c9202be18f9e2d81ccab33c7ce1a3..5d8bec2832677ed328f4d85d0814237f8dffeacb 100644 (file)
@@ -418,9 +418,6 @@ qlcnic_get_ringparam(struct net_device *dev,
        ring->rx_max_pending = adapter->max_rxd;
        ring->rx_jumbo_max_pending = adapter->max_jumbo_rxd;
        ring->tx_max_pending = MAX_CMD_DESCRIPTORS;
-
-       ring->rx_mini_max_pending = 0;
-       ring->rx_mini_pending = 0;
 }
 
 static u32
index 9536925f5bdd47647d10cdc9f894818260d6fc6c..f3cd96dfa398f01202b7af6d3c63d6f86a5e3c95 100644 (file)
@@ -682,12 +682,8 @@ static void efx_ethtool_get_ringparam(struct net_device *net_dev,
 
        ring->rx_max_pending = EFX_MAX_DMAQ_SIZE;
        ring->tx_max_pending = EFX_MAX_DMAQ_SIZE;
-       ring->rx_mini_max_pending = 0;
-       ring->rx_jumbo_max_pending = 0;
        ring->rx_pending = efx->rxq_entries;
        ring->tx_pending = efx->txq_entries;
-       ring->rx_mini_pending = 0;
-       ring->rx_jumbo_pending = 0;
 }
 
 static int efx_ethtool_set_ringparam(struct net_device *net_dev,