Commit b9c56ccb authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller
Browse files

ethernet: 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);

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com> #mlx*
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6213f07c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1912,10 +1912,8 @@ static int xgbe_close(struct net_device *netdev)
	clk_disable_unprepare(pdata->ptpclk);
	clk_disable_unprepare(pdata->sysclk);

	flush_workqueue(pdata->an_workqueue);
	destroy_workqueue(pdata->an_workqueue);

	flush_workqueue(pdata->dev_workqueue);
	destroy_workqueue(pdata->dev_workqueue);

	set_bit(XGBE_DOWN, &pdata->dev_state);
+0 −1
Original line number Diff line number Diff line
@@ -3515,7 +3515,6 @@ static void
bnad_uninit(struct bnad *bnad)
{
	if (bnad->work_q) {
		flush_workqueue(bnad->work_q);
		destroy_workqueue(bnad->work_q);
		bnad->work_q = NULL;
	}
+0 −1
Original line number Diff line number Diff line
@@ -490,7 +490,6 @@ void cleanup_rx_oom_poll_fn(struct net_device *netdev)
		wq = &lio->rxq_status_wq[q_no];
		if (wq->wq) {
			cancel_delayed_work_sync(&wq->wk.work);
			flush_workqueue(wq->wq);
			destroy_workqueue(wq->wq);
			wq->wq = NULL;
		}
+0 −1
Original line number Diff line number Diff line
@@ -4621,7 +4621,6 @@ static void be_destroy_err_recovery_workq(void)
	if (!be_err_recovery_workq)
		return;

	flush_workqueue(be_err_recovery_workq);
	destroy_workqueue(be_err_recovery_workq);
	be_err_recovery_workq = NULL;
}
+0 −1
Original line number Diff line number Diff line
@@ -1519,7 +1519,6 @@ static int cgx_lmac_exit(struct cgx *cgx)
	int i;

	if (cgx->cgx_cmd_workq) {
		flush_workqueue(cgx->cgx_cmd_workq);
		destroy_workqueue(cgx->cgx_cmd_workq);
		cgx->cgx_cmd_workq = NULL;
	}
Loading