All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
	Alexander Duyck <alexander.h.duyck@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next PATCH 3/8] igb: resolve warning of unused adapter struct
Date: Fri, 13 Mar 2009 23:40:58 -0700	[thread overview]
Message-ID: <20090314064058.4052.11753.stgit@lost.foo-projects.org> (raw)
In-Reply-To: <20090314064020.4052.46249.stgit@lost.foo-projects.org>

From: Alexander Duyck <alexander.h.duyck@intel.com>

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>
---

 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 28b22c3..d83d30e 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -4164,18 +4164,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))


  parent reply	other threads:[~2009-03-14  6:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-14  6:40 [net-next PATCH 1/8] igb: switch to new dca API Jeff Kirsher
2009-03-14  6:40 ` [net-next PATCH 2/8] igb: remove netif running call from igb_poll Jeff Kirsher
2009-03-14  6:40 ` Jeff Kirsher [this message]
2009-03-14  6:41 ` [net-next PATCH 4/8] igb: support wol on second port Jeff Kirsher
2009-03-14  6:41 ` [net-next PATCH 5/8] igb: add PF to pool Jeff Kirsher
2009-03-14  6:41 ` [net-next PATCH 6/8] igb: correct typo that was setting vfta mask to 1 Jeff Kirsher
2009-03-14  6:42 ` [net-next PATCH 7/8] igb: add support for another dual port 82576 non-security nic Jeff Kirsher
2009-03-14  6:42 ` [net-next PATCH 8/8] igb: add support for 82576 quad copper adapter Jeff Kirsher
2009-03-14 19:51 ` [net-next PATCH 1/8] igb: switch to new dca API David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090314064058.4052.11753.stgit@lost.foo-projects.org \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.