Staging: sbe-2t3e3: remove T3E3_USE_CONTIGMALLOC
authorAlexander Beregalov <a.beregalov@gmail.com>
Sat, 26 Mar 2011 17:18:09 +0000 (20:18 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Apr 2011 20:45:56 +0000 (13:45 -0700)
This code looks useless, t3e3_contigmemory_size is neither declared
nor used anywhere else, as well as T3E3_USE_CONTIGMALLOC.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/sbe-2t3e3/dc.c

index 126a9720c6b8c5e353d0c18a329eb48c87ec595d..dc53016d546c142d25807b61b294dba9ad1e2e8d 100644 (file)
@@ -341,10 +341,6 @@ u32 dc_init_descriptor_list(struct channel *sc)
                sc->ether.tx_ring = kzalloc(SBE_2T3E3_TX_DESC_RING_SIZE *
                                            sizeof(t3e3_tx_desc_t), GFP_KERNEL);
        if (sc->ether.tx_ring == NULL) {
-#ifdef T3E3_USE_CONTIGMALLOC
-               t3e3_contigmemory_size = SBE_2T3E3_RX_DESC_RING_SIZE *
-                       sizeof(t3e3_rx_desc_t);
-#endif
                kfree(sc->ether.rx_ring);
                sc->ether.rx_ring = NULL;
                dev_err(&sc->pdev->dev, "SBE 2T3E3: no buffer space for RX ring\n");
@@ -366,16 +362,8 @@ u32 dc_init_descriptor_list(struct channel *sc)
                                        dev_kfree_skb_any(sc->ether.rx_data[j]);
                                        sc->ether.rx_data[j] = NULL;
                                }
-#ifdef T3E3_USE_CONTIGMALLOC
-                               t3e3_contigmemory_size = SBE_2T3E3_RX_DESC_RING_SIZE *
-                                       sizeof(t3e3_rx_desc_t);
-#endif
                                kfree(sc->ether.rx_ring);
                                sc->ether.rx_ring = NULL;
-#ifdef T3E3_USE_CONTIGMALLOC
-                               t3e3_contigmemory_size = SBE_2T3E3_TX_DESC_RING_SIZE *
-                                       sizeof(t3e3_tx_desc_t);
-#endif
                                kfree(sc->ether.tx_ring);
                                sc->ether.tx_ring = NULL;
                                dev_err(&sc->pdev->dev, "SBE 2T3E3: token_alloc err:"
@@ -455,19 +443,11 @@ void dc_drop_descriptor_list(struct channel *sc)
        }
 
        if (sc->ether.rx_ring != NULL) {
-#ifdef T3E3_USE_CONTIGMALLOC
-               t3e3_contigmemory_size = SBE_2T3E3_RX_DESC_RING_SIZE *
-                       sizeof(t3e3_rx_desc_t);
-#endif
                kfree(sc->ether.rx_ring);
                sc->ether.rx_ring = NULL;
        }
 
        if (sc->ether.tx_ring != NULL) {
-#ifdef T3E3_USE_CONTIGMALLOC
-               t3e3_contigmemory_size = SBE_2T3E3_TX_DESC_RING_SIZE *
-                       sizeof(t3e3_tx_desc_t);
-#endif
                kfree(sc->ether.tx_ring);
                sc->ether.tx_ring = NULL;
        }