diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-03-13 16:40:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-14 15:41:02 -0400 |
commit | bd38e5d124ddd11c457c5ae7242cd039045d80e0 (patch) | |
tree | a234cdc42451fa0a861ccc7e1306bda773b7f38b /drivers/net | |
parent | 5e6d5b17db099dd575490545a4f0af9a99fa8bbe (diff) |
igb: resolve warning of unused adapter struct
If DCA is undefined then the adapter struct becomes unnecessary. To
resolve this issue the DCA calls can simply make a call to the adapter
struct through the rx_ring adapter struct member.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/igb/igb_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 4ff242de981e..5277d56e989e 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -4186,18 +4186,17 @@ static inline void igb_rx_irq_enable(struct igb_ring *rx_ring) | |||
4186 | static int igb_poll(struct napi_struct *napi, int budget) | 4186 | static int igb_poll(struct napi_struct *napi, int budget) |
4187 | { | 4187 | { |
4188 | struct igb_ring *rx_ring = container_of(napi, struct igb_ring, napi); | 4188 | struct igb_ring *rx_ring = container_of(napi, struct igb_ring, napi); |
4189 | struct igb_adapter *adapter = rx_ring->adapter; | ||
4190 | int work_done = 0; | 4189 | int work_done = 0; |
4191 | 4190 | ||
4192 | #ifdef CONFIG_IGB_DCA | 4191 | #ifdef CONFIG_IGB_DCA |
4193 | if (adapter->flags & IGB_FLAG_DCA_ENABLED) | 4192 | if (rx_ring->adapter->flags & IGB_FLAG_DCA_ENABLED) |
4194 | igb_update_rx_dca(rx_ring); | 4193 | igb_update_rx_dca(rx_ring); |
4195 | #endif | 4194 | #endif |
4196 | igb_clean_rx_irq_adv(rx_ring, &work_done, budget); | 4195 | igb_clean_rx_irq_adv(rx_ring, &work_done, budget); |
4197 | 4196 | ||
4198 | if (rx_ring->buddy) { | 4197 | if (rx_ring->buddy) { |
4199 | #ifdef CONFIG_IGB_DCA | 4198 | #ifdef CONFIG_IGB_DCA |
4200 | if (adapter->flags & IGB_FLAG_DCA_ENABLED) | 4199 | if (rx_ring->adapter->flags & IGB_FLAG_DCA_ENABLED) |
4201 | igb_update_tx_dca(rx_ring->buddy); | 4200 | igb_update_tx_dca(rx_ring->buddy); |
4202 | #endif | 4201 | #endif |
4203 | if (!igb_clean_tx_irq(rx_ring->buddy)) | 4202 | if (!igb_clean_tx_irq(rx_ring->buddy)) |