From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Alexander Duyck <alexander.h.duyck@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 2/8] ixgbevf: Drop netdev_registered value since that is already stored in netdev
Date: Tue, 17 Jul 2012 03:09:13 -0700 [thread overview]
Message-ID: <1342519759-25137-3-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1342519759-25137-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
There is no need to keep a separate netdev_registered value since that is
already stored in the netdev itself.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 1 -
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 +-----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
index 0cbce49..ed19f7e 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
@@ -231,7 +231,6 @@ struct ixgbevf_adapter {
bool link_up;
struct work_struct watchdog_task;
- bool netdev_registered;
};
enum ixbgevf_state_t {
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 3132771..3cd8651 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -3297,8 +3297,6 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev,
if (err)
goto err_register;
- adapter->netdev_registered = true;
-
netif_carrier_off(netdev);
ixgbevf_init_last_counter_stats(adapter);
@@ -3347,10 +3345,8 @@ static void __devexit ixgbevf_remove(struct pci_dev *pdev)
cancel_work_sync(&adapter->reset_task);
cancel_work_sync(&adapter->watchdog_task);
- if (adapter->netdev_registered) {
+ if (netdev->reg_state == NETREG_REGISTERED)
unregister_netdev(netdev);
- adapter->netdev_registered = false;
- }
ixgbevf_reset_interrupt_capability(adapter);
--
1.7.10.4
next prev parent reply other threads:[~2012-07-17 10:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-17 10:09 [net-next 0/8][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-07-17 10:09 ` [net-next 1/8] ixgbevf: Drop all dead or unnecessary code Jeff Kirsher
2012-07-17 10:09 ` Jeff Kirsher [this message]
2012-07-17 10:09 ` [net-next 3/8] ixgbevf: Make use of NETIF_F_RXCSUM instead of keeping our own flag Jeff Kirsher
2012-07-17 10:09 ` [net-next 4/8] ixgbevf: Drop use of eitr_low and eitr_high for hard coded values Jeff Kirsher
2012-07-17 10:09 ` [net-next 5/8] ixgbevf: Cleanup accounting for space needed at start of xmit_frame Jeff Kirsher
2012-07-17 10:09 ` [net-next 6/8] ixgbevf: Update q_vector to contain ring pointers instead of bitmaps Jeff Kirsher
2012-07-17 10:09 ` [net-next 7/8] ixgbevf: Move Tx clean-up into NAPI context Jeff Kirsher
2012-07-17 10:09 ` [net-next 8/8] ixgbevf: Use igb style interrupt masks instead of ixgbe style Jeff Kirsher
2012-07-17 10:22 ` [net-next 0/8][pull request] Intel Wired LAN Driver Updates 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=1342519759-25137-3-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).