aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/alias_GUID.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2021-10-10 16:08:10 +0200
committerJason Gunthorpe <jgg@nvidia.com>2021-10-12 13:21:23 -0300
commit8869574a6c11694dda6598c72b8e96cd1ac4e673 (patch)
tree30281390b160472ea39ce8e50fadf7a943bb4521 /drivers/infiniband/hw/mlx4/alias_GUID.c
parentRDMA/iwpm: Remove redundant initialization of pointer err_str (diff)
downloadlinux-dev-8869574a6c11694dda6598c72b8e96cd1ac4e673.tar.xz
linux-dev-8869574a6c11694dda6598c72b8e96cd1ac4e673.zip
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/alias_GUID.c')
-rw-r--r--drivers/infiniband/hw/mlx4/alias_GUID.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c b/drivers/infiniband/hw/mlx4/alias_GUID.c
index 571d9c542024..e2e1f5daddc4 100644
--- a/drivers/infiniband/hw/mlx4/alias_GUID.c
+++ b/drivers/infiniband/hw/mlx4/alias_GUID.c
@@ -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);
}