]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
igb: resolve warning of unused adapter struct
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 13 Mar 2009 20:40:58 +0000 (20:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Mar 2009 19:41:02 +0000 (12:41 -0700)
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>
drivers/net/igb/igb_main.c

index 4ff242de981ee086de21a9f0d28458f6a195efa3..5277d56e989edbcfb6c9a1aab96183d7ffb530c4 100644 (file)
@@ -4186,18 +4186,17 @@ static inline void igb_rx_irq_enable(struct igb_ring *rx_ring)
 static int igb_poll(struct napi_struct *napi, int budget)
 {
        struct igb_ring *rx_ring = container_of(napi, struct igb_ring, napi);
-       struct igb_adapter *adapter = rx_ring->adapter;
        int work_done = 0;
 
 #ifdef CONFIG_IGB_DCA
-       if (adapter->flags & IGB_FLAG_DCA_ENABLED)
+       if (rx_ring->adapter->flags & IGB_FLAG_DCA_ENABLED)
                igb_update_rx_dca(rx_ring);
 #endif
        igb_clean_rx_irq_adv(rx_ring, &work_done, budget);
 
        if (rx_ring->buddy) {
 #ifdef CONFIG_IGB_DCA
-               if (adapter->flags & IGB_FLAG_DCA_ENABLED)
+               if (rx_ring->adapter->flags & IGB_FLAG_DCA_ENABLED)
                        igb_update_tx_dca(rx_ring->buddy);
 #endif
                if (!igb_clean_tx_irq(rx_ring->buddy))