diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2008-08-26 07:25:08 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-03 10:08:16 -0400 |
commit | fc7d345d11e815705fd0c9badc2ee82cb7ca5a84 (patch) | |
tree | 4a27efe6e23d037a809f45d60821b6e5b4ce42d5 /drivers/net/igb | |
parent | 4662e82b2cb41c60826e50474dd86dd5c6372b0c (diff) |
igb: remove unneeded cleaned variable in clean_tx_irq path
The cleaned variable can be replaced by the count of packets cleaned during
the tx interrupt routine so it can be removed.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/igb_main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 634c4c9d87be..03806e299486 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -3617,16 +3617,14 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring) | |||
3617 | unsigned int i; | 3617 | unsigned int i; |
3618 | u32 head, oldhead; | 3618 | u32 head, oldhead; |
3619 | unsigned int count = 0; | 3619 | unsigned int count = 0; |
3620 | bool cleaned = false; | ||
3621 | bool retval = true; | ||
3622 | unsigned int total_bytes = 0, total_packets = 0; | 3620 | unsigned int total_bytes = 0, total_packets = 0; |
3621 | bool retval = true; | ||
3623 | 3622 | ||
3624 | rmb(); | 3623 | rmb(); |
3625 | head = get_head(tx_ring); | 3624 | head = get_head(tx_ring); |
3626 | i = tx_ring->next_to_clean; | 3625 | i = tx_ring->next_to_clean; |
3627 | while (1) { | 3626 | while (1) { |
3628 | while (i != head) { | 3627 | while (i != head) { |
3629 | cleaned = true; | ||
3630 | tx_desc = E1000_TX_DESC(*tx_ring, i); | 3628 | tx_desc = E1000_TX_DESC(*tx_ring, i); |
3631 | buffer_info = &tx_ring->buffer_info[i]; | 3629 | buffer_info = &tx_ring->buffer_info[i]; |
3632 | skb = buffer_info->skb; | 3630 | skb = buffer_info->skb; |
@@ -3643,7 +3641,6 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring) | |||
3643 | } | 3641 | } |
3644 | 3642 | ||
3645 | igb_unmap_and_free_tx_resource(adapter, buffer_info); | 3643 | igb_unmap_and_free_tx_resource(adapter, buffer_info); |
3646 | tx_desc->upper.data = 0; | ||
3647 | 3644 | ||
3648 | i++; | 3645 | i++; |
3649 | if (i == tx_ring->count) | 3646 | if (i == tx_ring->count) |
@@ -3665,7 +3662,7 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring) | |||
3665 | done_cleaning: | 3662 | done_cleaning: |
3666 | tx_ring->next_to_clean = i; | 3663 | tx_ring->next_to_clean = i; |
3667 | 3664 | ||
3668 | if (unlikely(cleaned && | 3665 | if (unlikely(count && |
3669 | netif_carrier_ok(netdev) && | 3666 | netif_carrier_ok(netdev) && |
3670 | IGB_DESC_UNUSED(tx_ring) >= IGB_TX_QUEUE_WAKE)) { | 3667 | IGB_DESC_UNUSED(tx_ring) >= IGB_TX_QUEUE_WAKE)) { |
3671 | /* Make sure that anybody stopping the queue after this | 3668 | /* Make sure that anybody stopping the queue after this |