]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
accel/qaic: Remove redundant 'flush_workqueue()' calls
authorChen Ni <nichen@iscas.ac.cn>
Wed, 12 Mar 2025 07:34:04 +0000 (15:34 +0800)
committerJeff Hugo <jeff.hugo@oss.qualcomm.com>
Fri, 14 Mar 2025 16:59:53 +0000 (10:59 -0600)
'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: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250312073404.1429992-1-nichen@iscas.ac.cn
drivers/accel/qaic/qaic_debugfs.c

index ba0cf2f94732cc6178abeaeab40adf6eb830ad19..a991b8198dc40e88225dc60fc4c3ff8cc005fba7 100644 (file)
@@ -240,7 +240,6 @@ static int qaic_bootlog_mhi_probe(struct mhi_device *mhi_dev, const struct mhi_d
 mhi_unprepare:
        mhi_unprepare_from_transfer(mhi_dev);
 destroy_workqueue:
-       flush_workqueue(qdev->bootlog_wq);
        destroy_workqueue(qdev->bootlog_wq);
 out:
        return ret;
@@ -253,7 +252,6 @@ static void qaic_bootlog_mhi_remove(struct mhi_device *mhi_dev)
        qdev = dev_get_drvdata(&mhi_dev->dev);
 
        mhi_unprepare_from_transfer(qdev->bootlog_ch);
-       flush_workqueue(qdev->bootlog_wq);
        destroy_workqueue(qdev->bootlog_wq);
        qdev->bootlog_ch = NULL;
 }