diff options
author | Joe Perches <joe@perches.com> | 2013-04-12 13:12:54 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-04-18 16:53:48 -0400 |
commit | 33243fb08678d6bdbe3f442dd72ed50b45efd474 (patch) | |
tree | b148ec74b4ac59b157b644d351aa17335f69ebcf | |
parent | 979fe5f73940eae8c0fc4936b9ebb5e34db89490 (diff) |
ixgbe: Remove unnecessary #ifdef CONFIG_DEBUG_FS tests
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>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe.h | 5 | ||||
-rw-r--r-- | 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 a8e10cff7a89..ca932387a80f 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); | |||
740 | extern void ixgbe_dbg_adapter_exit(struct ixgbe_adapter *adapter); | 740 | extern void ixgbe_dbg_adapter_exit(struct ixgbe_adapter *adapter); |
741 | extern void ixgbe_dbg_init(void); | 741 | extern void ixgbe_dbg_init(void); |
742 | extern void ixgbe_dbg_exit(void); | 742 | extern void ixgbe_dbg_exit(void); |
743 | #else | ||
744 | static inline void ixgbe_dbg_adapter_init(struct ixgbe_adapter *adapter) {} | ||
745 | static inline void ixgbe_dbg_adapter_exit(struct ixgbe_adapter *adapter) {} | ||
746 | static inline void ixgbe_dbg_init(void) {} | ||
747 | static inline void ixgbe_dbg_exit(void) {} | ||
743 | #endif /* CONFIG_DEBUG_FS */ | 748 | #endif /* CONFIG_DEBUG_FS */ |
744 | static inline struct netdev_queue *txring_txq(const struct ixgbe_ring *ring) | 749 | static inline struct netdev_queue *txring_txq(const struct ixgbe_ring *ring) |
745 | { | 750 | { |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index aa5d7d0ba45e..c022f9c417a6 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: | |||
7626 | e_err(probe, "failed to allocate sysfs resources\n"); | 7626 | e_err(probe, "failed to allocate sysfs resources\n"); |
7627 | #endif /* CONFIG_IXGBE_HWMON */ | 7627 | #endif /* CONFIG_IXGBE_HWMON */ |
7628 | 7628 | ||
7629 | #ifdef CONFIG_DEBUG_FS | ||
7630 | ixgbe_dbg_adapter_init(adapter); | 7629 | ixgbe_dbg_adapter_init(adapter); |
7631 | #endif /* CONFIG_DEBUG_FS */ | ||
7632 | 7630 | ||
7633 | /* Need link setup for MNG FW, else wait for IXGBE_UP */ | 7631 | /* Need link setup for MNG FW, else wait for IXGBE_UP */ |
7634 | if (hw->mng_fw_enabled && hw->mac.ops.setup_link) | 7632 | if (hw->mng_fw_enabled && hw->mac.ops.setup_link) |
@@ -7670,9 +7668,7 @@ static void ixgbe_remove(struct pci_dev *pdev) | |||
7670 | struct ixgbe_adapter *adapter = pci_get_drvdata(pdev); | 7668 | struct ixgbe_adapter *adapter = pci_get_drvdata(pdev); |
7671 | struct net_device *netdev = adapter->netdev; | 7669 | struct net_device *netdev = adapter->netdev; |
7672 | 7670 | ||
7673 | #ifdef CONFIG_DEBUG_FS | ||
7674 | ixgbe_dbg_adapter_exit(adapter); | 7671 | ixgbe_dbg_adapter_exit(adapter); |
7675 | #endif /*CONFIG_DEBUG_FS */ | ||
7676 | 7672 | ||
7677 | set_bit(__IXGBE_DOWN, &adapter->state); | 7673 | set_bit(__IXGBE_DOWN, &adapter->state); |
7678 | cancel_work_sync(&adapter->service_task); | 7674 | cancel_work_sync(&adapter->service_task); |
@@ -7935,15 +7931,11 @@ static int __init ixgbe_init_module(void) | |||
7935 | pr_info("%s - version %s\n", ixgbe_driver_string, ixgbe_driver_version); | 7931 | pr_info("%s - version %s\n", ixgbe_driver_string, ixgbe_driver_version); |
7936 | pr_info("%s\n", ixgbe_copyright); | 7932 | pr_info("%s\n", ixgbe_copyright); |
7937 | 7933 | ||
7938 | #ifdef CONFIG_DEBUG_FS | ||
7939 | ixgbe_dbg_init(); | 7934 | ixgbe_dbg_init(); |
7940 | #endif /* CONFIG_DEBUG_FS */ | ||
7941 | 7935 | ||
7942 | ret = pci_register_driver(&ixgbe_driver); | 7936 | ret = pci_register_driver(&ixgbe_driver); |
7943 | if (ret) { | 7937 | if (ret) { |
7944 | #ifdef CONFIG_DEBUG_FS | ||
7945 | ixgbe_dbg_exit(); | 7938 | ixgbe_dbg_exit(); |
7946 | #endif /* CONFIG_DEBUG_FS */ | ||
7947 | return ret; | 7939 | return ret; |
7948 | } | 7940 | } |
7949 | 7941 | ||
@@ -7969,9 +7961,7 @@ static void __exit ixgbe_exit_module(void) | |||
7969 | #endif | 7961 | #endif |
7970 | pci_unregister_driver(&ixgbe_driver); | 7962 | pci_unregister_driver(&ixgbe_driver); |
7971 | 7963 | ||
7972 | #ifdef CONFIG_DEBUG_FS | ||
7973 | ixgbe_dbg_exit(); | 7964 | ixgbe_dbg_exit(); |
7974 | #endif /* CONFIG_DEBUG_FS */ | ||
7975 | 7965 | ||
7976 | rcu_barrier(); /* Wait for completion of call_rcu()'s */ | 7966 | rcu_barrier(); /* Wait for completion of call_rcu()'s */ |
7977 | } | 7967 | } |