Commit f8e7bce3 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Rob Clark
Browse files

drm: 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>
Acked-by: default avatarJyri Sarha <jyri.sarha@iki.fi>
Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
Link: https://lore.kernel.org/r/75e8ba40076ad707d47e3a3670e6b23c1b8b11bc.1633874223.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent eea8f024
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1733,7 +1733,6 @@ static void etnaviv_gpu_unbind(struct device *dev, struct device *master,

	DBG("%s", dev_name(gpu->dev));

	flush_workqueue(gpu->wq);
	destroy_workqueue(gpu->wq);

	etnaviv_sched_fini(gpu);
+0 −1
Original line number Diff line number Diff line
@@ -1904,7 +1904,6 @@ void msm_dsi_host_destroy(struct mipi_dsi_host *host)
	DBG("");
	dsi_tx_buf_free(msm_host);
	if (msm_host->workqueue) {
		flush_workqueue(msm_host->workqueue);
		destroy_workqueue(msm_host->workqueue);
		msm_host->workqueue = NULL;
	}
+0 −1
Original line number Diff line number Diff line
@@ -1190,7 +1190,6 @@ void msm_edp_ctrl_destroy(struct edp_ctrl *ctrl)
		return;

	if (ctrl->workqueue) {
		flush_workqueue(ctrl->workqueue);
		destroy_workqueue(ctrl->workqueue);
		ctrl->workqueue = NULL;
	}
+1 −3
Original line number Diff line number Diff line
@@ -61,10 +61,8 @@ static void msm_hdmi_destroy(struct hdmi *hdmi)
	 * at this point, hpd has been disabled,
	 * after flush workq, it's safe to deinit hdcp
	 */
	if (hdmi->workq) {
		flush_workqueue(hdmi->workq);
	if (hdmi->workq)
		destroy_workqueue(hdmi->workq);
	}
	msm_hdmi_hdcp_destroy(hdmi);

	if (hdmi->phy_dev) {
+1 −3
Original line number Diff line number Diff line
@@ -186,10 +186,8 @@ static void tilcdc_fini(struct drm_device *dev)
	if (priv->mmio)
		iounmap(priv->mmio);

	if (priv->wq) {
		flush_workqueue(priv->wq);
	if (priv->wq)
		destroy_workqueue(priv->wq);
	}

	dev->dev_private = NULL;

Loading