mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-02 17:16:45 +00:00
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>
This commit is contained in:
parent
979fe5f739
commit
33243fb086
@ -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_adapter_exit(struct ixgbe_adapter *adapter);
|
||||||
extern void ixgbe_dbg_init(void);
|
extern void ixgbe_dbg_init(void);
|
||||||
extern void ixgbe_dbg_exit(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 */
|
#endif /* CONFIG_DEBUG_FS */
|
||||||
static inline struct netdev_queue *txring_txq(const struct ixgbe_ring *ring)
|
static inline struct netdev_queue *txring_txq(const struct ixgbe_ring *ring)
|
||||||
{
|
{
|
||||||
|
@ -7626,9 +7626,7 @@ skip_sriov:
|
|||||||
e_err(probe, "failed to allocate sysfs resources\n");
|
e_err(probe, "failed to allocate sysfs resources\n");
|
||||||
#endif /* CONFIG_IXGBE_HWMON */
|
#endif /* CONFIG_IXGBE_HWMON */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FS
|
|
||||||
ixgbe_dbg_adapter_init(adapter);
|
ixgbe_dbg_adapter_init(adapter);
|
||||||
#endif /* CONFIG_DEBUG_FS */
|
|
||||||
|
|
||||||
/* Need link setup for MNG FW, else wait for IXGBE_UP */
|
/* Need link setup for MNG FW, else wait for IXGBE_UP */
|
||||||
if (hw->mng_fw_enabled && hw->mac.ops.setup_link)
|
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 ixgbe_adapter *adapter = pci_get_drvdata(pdev);
|
||||||
struct net_device *netdev = adapter->netdev;
|
struct net_device *netdev = adapter->netdev;
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FS
|
|
||||||
ixgbe_dbg_adapter_exit(adapter);
|
ixgbe_dbg_adapter_exit(adapter);
|
||||||
#endif /*CONFIG_DEBUG_FS */
|
|
||||||
|
|
||||||
set_bit(__IXGBE_DOWN, &adapter->state);
|
set_bit(__IXGBE_DOWN, &adapter->state);
|
||||||
cancel_work_sync(&adapter->service_task);
|
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 - version %s\n", ixgbe_driver_string, ixgbe_driver_version);
|
||||||
pr_info("%s\n", ixgbe_copyright);
|
pr_info("%s\n", ixgbe_copyright);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FS
|
|
||||||
ixgbe_dbg_init();
|
ixgbe_dbg_init();
|
||||||
#endif /* CONFIG_DEBUG_FS */
|
|
||||||
|
|
||||||
ret = pci_register_driver(&ixgbe_driver);
|
ret = pci_register_driver(&ixgbe_driver);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
#ifdef CONFIG_DEBUG_FS
|
|
||||||
ixgbe_dbg_exit();
|
ixgbe_dbg_exit();
|
||||||
#endif /* CONFIG_DEBUG_FS */
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7969,9 +7961,7 @@ static void __exit ixgbe_exit_module(void)
|
|||||||
#endif
|
#endif
|
||||||
pci_unregister_driver(&ixgbe_driver);
|
pci_unregister_driver(&ixgbe_driver);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FS
|
|
||||||
ixgbe_dbg_exit();
|
ixgbe_dbg_exit();
|
||||||
#endif /* CONFIG_DEBUG_FS */
|
|
||||||
|
|
||||||
rcu_barrier(); /* Wait for completion of call_rcu()'s */
|
rcu_barrier(); /* Wait for completion of call_rcu()'s */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user