Commit 8869574a authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jason Gunthorpe
Browse files

RDMA: Remove redundant 'flush_workqueue()' calls

'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

This was generated with coccinelle:

@@
expression E;
@@
- 	flush_workqueue(E);
	destroy_workqueue(E);

Link: https://lore.kernel.org/r/ca7bac6e6c9c5cc8d04eec3944edb13de0e381a3.1633874776.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 4bd46f3a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2261,7 +2261,6 @@ int ib_sa_init(void)
void ib_sa_cleanup(void)
{
	cancel_delayed_work(&ib_nl_timed_work);
	flush_workqueue(ib_nl_wq);
	destroy_workqueue(ib_nl_wq);
	mcast_cleanup();
	ib_unregister_client(&sa_client);
+0 −1
Original line number Diff line number Diff line
@@ -4464,6 +4464,5 @@ int __init c4iw_cm_init(void)
void c4iw_cm_term(void)
{
	WARN_ON(!list_empty(&timeout_list));
	flush_workqueue(workq);
	destroy_workqueue(workq);
}
+0 −1
Original line number Diff line number Diff line
@@ -1562,7 +1562,6 @@ static void __exit c4iw_exit_module(void)
		kfree(ctx);
	}
	mutex_unlock(&dev_mutex);
	flush_workqueue(reg_workq);
	destroy_workqueue(reg_workq);
	cxgb4_unregister_uld(CXGB4_ULD_RDMA);
	c4iw_cm_term();
+1 −3
Original line number Diff line number Diff line
@@ -822,10 +822,8 @@ void mlx4_ib_destroy_alias_guid_service(struct mlx4_ib_dev *dev)
		}
		spin_unlock_irqrestore(&sriov->alias_guid.ag_work_lock, flags);
	}
	for (i = 0 ; i < dev->num_ports; i++) {
		flush_workqueue(dev->sriov.alias_guid.ports_guid[i].wq);
	for (i = 0 ; i < dev->num_ports; i++)
		destroy_workqueue(dev->sriov.alias_guid.ports_guid[i].wq);
	}
	ib_sa_unregister_client(dev->sriov.alias_guid.sa_client);
	kfree(dev->sriov.alias_guid.sa_client);
}
+1 −3
Original line number Diff line number Diff line
@@ -1951,8 +1951,6 @@ int siw_cm_init(void)

void siw_cm_exit(void)
{
	if (siw_cm_wq) {
		flush_workqueue(siw_cm_wq);
	if (siw_cm_wq)
		destroy_workqueue(siw_cm_wq);
}
}
Loading