diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2013-01-15 02:28:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-16 14:40:49 -0500 |
commit | 69b9a712661cbd43bc9c20575c947ddb34314ac9 (patch) | |
tree | 034aa615f411b5a5f179955610d9f340a83c171c /drivers/net/vmxnet3 | |
parent | 0d735f13d8842d94ea8236baf12db3bea7daaf98 (diff) |
vmxnet3: remove unnecessary bookkeeping
The uncommitted[] array was set but never used except in a debug
message. Remove it.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 9 | ||||
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_int.h | 2 |
2 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 3402a0cf1945..99ef9eddfc78 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -628,12 +628,10 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_rx_queue *rq, u32 ring_idx, | |||
628 | num_allocated++; | 628 | num_allocated++; |
629 | vmxnet3_cmd_ring_adv_next2fill(ring); | 629 | vmxnet3_cmd_ring_adv_next2fill(ring); |
630 | } | 630 | } |
631 | rq->uncommitted[ring_idx] += num_allocated; | ||
632 | 631 | ||
633 | dev_dbg(&adapter->netdev->dev, | 632 | dev_dbg(&adapter->netdev->dev, |
634 | "alloc_rx_buf: %d allocated, next2fill %u, next2comp " | 633 | "alloc_rx_buf: %d allocated, next2fill %u, next2comp %u\n", |
635 | "%u, uncommitted %u\n", num_allocated, ring->next2fill, | 634 | num_allocated, ring->next2fill, ring->next2comp); |
636 | ring->next2comp, rq->uncommitted[ring_idx]); | ||
637 | 635 | ||
638 | /* so that the device can distinguish a full ring and an empty ring */ | 636 | /* so that the device can distinguish a full ring and an empty ring */ |
639 | BUG_ON(num_allocated != 0 && ring->next2fill == ring->next2comp); | 637 | BUG_ON(num_allocated != 0 && ring->next2fill == ring->next2comp); |
@@ -1331,7 +1329,6 @@ rcd_done: | |||
1331 | VMXNET3_WRITE_BAR0_REG(adapter, | 1329 | VMXNET3_WRITE_BAR0_REG(adapter, |
1332 | rxprod_reg[ring_idx] + rq->qid * 8, | 1330 | rxprod_reg[ring_idx] + rq->qid * 8, |
1333 | ring->next2fill); | 1331 | ring->next2fill); |
1334 | rq->uncommitted[ring_idx] = 0; | ||
1335 | } | 1332 | } |
1336 | 1333 | ||
1337 | vmxnet3_comp_ring_adv_next2proc(&rq->comp_ring); | 1334 | vmxnet3_comp_ring_adv_next2proc(&rq->comp_ring); |
@@ -1376,7 +1373,6 @@ vmxnet3_rq_cleanup(struct vmxnet3_rx_queue *rq, | |||
1376 | rq->rx_ring[ring_idx].gen = VMXNET3_INIT_GEN; | 1373 | rq->rx_ring[ring_idx].gen = VMXNET3_INIT_GEN; |
1377 | rq->rx_ring[ring_idx].next2fill = | 1374 | rq->rx_ring[ring_idx].next2fill = |
1378 | rq->rx_ring[ring_idx].next2comp = 0; | 1375 | rq->rx_ring[ring_idx].next2comp = 0; |
1379 | rq->uncommitted[ring_idx] = 0; | ||
1380 | } | 1376 | } |
1381 | 1377 | ||
1382 | rq->comp_ring.gen = VMXNET3_INIT_GEN; | 1378 | rq->comp_ring.gen = VMXNET3_INIT_GEN; |
@@ -1457,7 +1453,6 @@ vmxnet3_rq_init(struct vmxnet3_rx_queue *rq, | |||
1457 | /* reset internal state and allocate buffers for both rings */ | 1453 | /* reset internal state and allocate buffers for both rings */ |
1458 | for (i = 0; i < 2; i++) { | 1454 | for (i = 0; i < 2; i++) { |
1459 | rq->rx_ring[i].next2fill = rq->rx_ring[i].next2comp = 0; | 1455 | rq->rx_ring[i].next2fill = rq->rx_ring[i].next2comp = 0; |
1460 | rq->uncommitted[i] = 0; | ||
1461 | 1456 | ||
1462 | memset(rq->rx_ring[i].base, 0, rq->rx_ring[i].size * | 1457 | memset(rq->rx_ring[i].base, 0, rq->rx_ring[i].size * |
1463 | sizeof(struct Vmxnet3_RxDesc)); | 1458 | sizeof(struct Vmxnet3_RxDesc)); |
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index fc46a81ad538..55465ed5835b 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h | |||
@@ -276,8 +276,6 @@ struct vmxnet3_rx_queue { | |||
276 | struct vmxnet3_rx_ctx rx_ctx; | 276 | struct vmxnet3_rx_ctx rx_ctx; |
277 | u32 qid; /* rqID in RCD for buffer from 1st ring */ | 277 | u32 qid; /* rqID in RCD for buffer from 1st ring */ |
278 | u32 qid2; /* rqID in RCD for buffer from 2nd ring */ | 278 | u32 qid2; /* rqID in RCD for buffer from 2nd ring */ |
279 | u32 uncommitted[2]; /* # of buffers allocated since last RXPROD | ||
280 | * update */ | ||
281 | struct vmxnet3_rx_buf_info *buf_info[2]; | 279 | struct vmxnet3_rx_buf_info *buf_info[2]; |
282 | struct Vmxnet3_RxQueueCtrl *shared; | 280 | struct Vmxnet3_RxQueueCtrl *shared; |
283 | struct vmxnet3_rq_driver_stats stats; | 281 | struct vmxnet3_rq_driver_stats stats; |