From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Joe Perches <joe@perches.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 03/15] ixgbe: Remove unnecessary #ifdef CONFIG_DEBUG_FS tests
Date: Thu, 18 Apr 2013 16:30:10 -0700 [thread overview]
Message-ID: <1366327822-10741-4-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1366327822-10741-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Joe Perches <joe@perches.com>
Add some empty static inlines instead to make
the code more readable.
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 5 +++++
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 ----------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index a8e10cf..ca93238 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -740,6 +740,11 @@ extern void ixgbe_dbg_adapter_init(struct ixgbe_adapter *adapter);
extern void ixgbe_dbg_adapter_exit(struct ixgbe_adapter *adapter);
extern void ixgbe_dbg_init(void);
extern void ixgbe_dbg_exit(void);
+#else
+static inline void ixgbe_dbg_adapter_init(struct ixgbe_adapter *adapter) {}
+static inline void ixgbe_dbg_adapter_exit(struct ixgbe_adapter *adapter) {}
+static inline void ixgbe_dbg_init(void) {}
+static inline void ixgbe_dbg_exit(void) {}
#endif /* CONFIG_DEBUG_FS */
static inline struct netdev_queue *txring_txq(const struct ixgbe_ring *ring)
{
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index aa5d7d0..c022f9c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7626,9 +7626,7 @@ skip_sriov:
e_err(probe, "failed to allocate sysfs resources\n");
#endif /* CONFIG_IXGBE_HWMON */
-#ifdef CONFIG_DEBUG_FS
ixgbe_dbg_adapter_init(adapter);
-#endif /* CONFIG_DEBUG_FS */
/* Need link setup for MNG FW, else wait for IXGBE_UP */
if (hw->mng_fw_enabled && hw->mac.ops.setup_link)
@@ -7670,9 +7668,7 @@ static void ixgbe_remove(struct pci_dev *pdev)
struct ixgbe_adapter *adapter = pci_get_drvdata(pdev);
struct net_device *netdev = adapter->netdev;
-#ifdef CONFIG_DEBUG_FS
ixgbe_dbg_adapter_exit(adapter);
-#endif /*CONFIG_DEBUG_FS */
set_bit(__IXGBE_DOWN, &adapter->state);
cancel_work_sync(&adapter->service_task);
@@ -7935,15 +7931,11 @@ static int __init ixgbe_init_module(void)
pr_info("%s - version %s\n", ixgbe_driver_string, ixgbe_driver_version);
pr_info("%s\n", ixgbe_copyright);
-#ifdef CONFIG_DEBUG_FS
ixgbe_dbg_init();
-#endif /* CONFIG_DEBUG_FS */
ret = pci_register_driver(&ixgbe_driver);
if (ret) {
-#ifdef CONFIG_DEBUG_FS
ixgbe_dbg_exit();
-#endif /* CONFIG_DEBUG_FS */
return ret;
}
@@ -7969,9 +7961,7 @@ static void __exit ixgbe_exit_module(void)
#endif
pci_unregister_driver(&ixgbe_driver);
-#ifdef CONFIG_DEBUG_FS
ixgbe_dbg_exit();
-#endif /* CONFIG_DEBUG_FS */
rcu_barrier(); /* Wait for completion of call_rcu()'s */
}
--
1.7.11.7
next prev parent reply other threads:[~2013-04-18 23:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 23:30 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-04-18 23:30 ` [net-next 01/15] ixgbe: in shutdown, do netif_running() under rtnl_lock Jeff Kirsher
2013-04-18 23:30 ` [net-next 02/15] ixgbe: Add support for WoL on 82599 SFP+ LOM Jeff Kirsher
2013-04-18 23:30 ` Jeff Kirsher [this message]
2013-04-18 23:30 ` [net-next v2 04/15] igb: Support for 100base-fx SFP Jeff Kirsher
2013-04-18 23:30 ` [net-next v2 05/15] igb: Support to read and export SFF-8472/8079 data Jeff Kirsher
2013-04-18 23:37 ` Jeff Kirsher
2013-04-18 23:41 ` Jeff Kirsher
2013-04-19 18:20 ` David Miller
2013-04-18 23:30 ` [net-next 06/15] igb: Implement support to power sfp cage and turn on I2C Jeff Kirsher
2013-04-18 23:30 ` [net-next 07/15] igb: random code and comments fix Jeff Kirsher
2013-04-18 23:30 ` [net-next 08/15] igb: Mask off check of frag_off as we only want fragment offset Jeff Kirsher
2013-04-18 23:30 ` [net-next 09/15] igb: Pull adapter out of main path in igb_xmit_frame_ring Jeff Kirsher
2013-04-18 23:30 ` [net-next 10/15] igb: Use rx/tx_itr_setting when setting up initial value of itr Jeff Kirsher
2013-04-18 23:30 ` [net-next 11/15] igb: Fix sparse warnings on function pointers Jeff Kirsher
2013-04-18 23:30 ` [net-next 12/15] igb: Fix code comments and whitespace Jeff Kirsher
2013-04-18 23:30 ` [net-next 13/15] igb: Enable EEE LP advertisement Jeff Kirsher
2013-04-18 23:30 ` [net-next 14/15] igb: add support for spoofchk config Jeff Kirsher
2013-04-18 23:30 ` [net-next 15/15] igb: Add support for i354 devices Jeff Kirsher
2013-04-19 18:19 ` [net-next 00/15][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=1366327822-10741-4-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=joe@perches.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).