Skip to content

Commit

Permalink
e1000: drop redunant line of code, cleanup
Browse files Browse the repository at this point in the history
adapter was being assigned twice, also clarified variable name and unwrapped
line.

Signed-off-by: Jesse Brandeburg <[email protected]>
Signed-off-by: Don Skidmore <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jbrandeb authored and davem330 committed Sep 27, 2009
1 parent 3d6114e commit 650b5a5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
@@ -3394,17 +3394,13 @@ static irqreturn_t e1000_intr(int irq, void *data)
static int e1000_clean(struct napi_struct *napi, int budget)
{
struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
struct net_device *poll_dev = adapter->netdev;
int tx_cleaned = 0, work_done = 0;
int tx_clean_complete = 0, work_done = 0;

adapter = netdev_priv(poll_dev);
tx_clean_complete = e1000_clean_tx_irq(adapter, &adapter->tx_ring[0]);

tx_cleaned = e1000_clean_tx_irq(adapter, &adapter->tx_ring[0]);
adapter->clean_rx(adapter, &adapter->rx_ring[0], &work_done, budget);

adapter->clean_rx(adapter, &adapter->rx_ring[0],
&work_done, budget);

if (!tx_cleaned)
if (!tx_clean_complete)
work_done = budget;

/* If budget not fully consumed, exit the polling mode */

0 comments on commit 650b5a5

Please sign in to comment.