Commit 09e36360 authored by Ivan Vecera's avatar Ivan Vecera Committed by David S. Miller

bna: remove global bnad_list_mutex

Remove global bnad_list_mutex as it is not used anymore. This makes
bnad_add_to_list() and bnad_remove_from_list() empty so remove them too.
Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 285eb9c3
...@@ -55,7 +55,6 @@ MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1," ...@@ -55,7 +55,6 @@ MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1,"
*/ */
static u32 bnad_rxqs_per_cq = 2; static u32 bnad_rxqs_per_cq = 2;
static atomic_t bna_id; static atomic_t bna_id;
static struct mutex bnad_list_mutex;
static const u8 bnad_bcast_addr[] __aligned(2) = static const u8 bnad_bcast_addr[] __aligned(2) =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
...@@ -75,20 +74,6 @@ do { \ ...@@ -75,20 +74,6 @@ do { \
(_res_info)->res_u.mem_info.len = (_size); \ (_res_info)->res_u.mem_info.len = (_size); \
} while (0) } while (0)
static void
bnad_add_to_list(struct bnad *bnad)
{
mutex_lock(&bnad_list_mutex);
mutex_unlock(&bnad_list_mutex);
}
static void
bnad_remove_from_list(struct bnad *bnad)
{
mutex_lock(&bnad_list_mutex);
mutex_unlock(&bnad_list_mutex);
}
/* /*
* Reinitialize completions in CQ, once Rx is taken down * Reinitialize completions in CQ, once Rx is taken down
*/ */
...@@ -3569,14 +3554,12 @@ bnad_lock_init(struct bnad *bnad) ...@@ -3569,14 +3554,12 @@ bnad_lock_init(struct bnad *bnad)
{ {
spin_lock_init(&bnad->bna_lock); spin_lock_init(&bnad->bna_lock);
mutex_init(&bnad->conf_mutex); mutex_init(&bnad->conf_mutex);
mutex_init(&bnad_list_mutex);
} }
static void static void
bnad_lock_uninit(struct bnad *bnad) bnad_lock_uninit(struct bnad *bnad)
{ {
mutex_destroy(&bnad->conf_mutex); mutex_destroy(&bnad->conf_mutex);
mutex_destroy(&bnad_list_mutex);
} }
/* PCI Initialization */ /* PCI Initialization */
...@@ -3649,7 +3632,6 @@ bnad_pci_probe(struct pci_dev *pdev, ...@@ -3649,7 +3632,6 @@ bnad_pci_probe(struct pci_dev *pdev,
} }
bnad = netdev_priv(netdev); bnad = netdev_priv(netdev);
bnad_lock_init(bnad); bnad_lock_init(bnad);
bnad_add_to_list(bnad);
bnad->id = atomic_inc_return(&bna_id) - 1; bnad->id = atomic_inc_return(&bna_id) - 1;
mutex_lock(&bnad->conf_mutex); mutex_lock(&bnad->conf_mutex);
...@@ -3804,7 +3786,6 @@ bnad_pci_probe(struct pci_dev *pdev, ...@@ -3804,7 +3786,6 @@ bnad_pci_probe(struct pci_dev *pdev,
bnad_pci_uninit(pdev); bnad_pci_uninit(pdev);
unlock_mutex: unlock_mutex:
mutex_unlock(&bnad->conf_mutex); mutex_unlock(&bnad->conf_mutex);
bnad_remove_from_list(bnad);
bnad_lock_uninit(bnad); bnad_lock_uninit(bnad);
free_netdev(netdev); free_netdev(netdev);
return err; return err;
...@@ -3842,7 +3823,6 @@ bnad_pci_remove(struct pci_dev *pdev) ...@@ -3842,7 +3823,6 @@ bnad_pci_remove(struct pci_dev *pdev)
bnad_disable_msix(bnad); bnad_disable_msix(bnad);
bnad_pci_uninit(pdev); bnad_pci_uninit(pdev);
mutex_unlock(&bnad->conf_mutex); mutex_unlock(&bnad->conf_mutex);
bnad_remove_from_list(bnad);
bnad_lock_uninit(bnad); bnad_lock_uninit(bnad);
/* Remove the debugfs node for this bnad */ /* Remove the debugfs node for this bnad */
kfree(bnad->regdata); kfree(bnad->regdata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment