]> git.karo-electronics.de Git - linux-beck.git/commitdiff
nfp: simplify nfp_net_poll()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 31 Oct 2016 20:43:09 +0000 (20:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Nov 2016 15:04:58 +0000 (11:04 -0400)
There are few variables in nfp_net_poll() which are used only
once or unused but set.  Remove them.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c

index d365760fa75b7e9f299b66c0e9d6ecdf14640ab2..f6a42c14a1f0feeb9ddba5e1838e886f9b799e83 100644 (file)
@@ -1525,21 +1525,15 @@ static int nfp_net_poll(struct napi_struct *napi, int budget)
 {
        struct nfp_net_r_vector *r_vec =
                container_of(napi, struct nfp_net_r_vector, napi);
-       struct nfp_net_rx_ring *rx_ring = r_vec->rx_ring;
-       struct nfp_net_tx_ring *tx_ring = r_vec->tx_ring;
-       struct nfp_net *nn = r_vec->nfp_net;
-       struct netdev_queue *txq;
        unsigned int pkts_polled;
 
-       tx_ring = &nn->tx_rings[rx_ring->idx];
-       txq = netdev_get_tx_queue(nn->netdev, tx_ring->idx);
-       nfp_net_tx_complete(tx_ring);
+       nfp_net_tx_complete(r_vec->tx_ring);
 
-       pkts_polled = nfp_net_rx(rx_ring, budget);
+       pkts_polled = nfp_net_rx(r_vec->rx_ring, budget);
 
        if (pkts_polled < budget) {
                napi_complete_done(napi, pkts_polled);
-               nfp_net_irq_unmask(nn, r_vec->irq_idx);
+               nfp_net_irq_unmask(r_vec->nfp_net, r_vec->irq_idx);
        }
 
        return pkts_polled;