Skip to contentSkip to conversation

vchiq-mmal: Remove redundant 'flush_workqueue()' calls

PATCH In review [email protected] 3 participants 4 messages Jan 27, 2022 – Jan 28, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vchiq-mmal: Remove redundant 'flush_workqueue()' calls

From: "Minghao Chi (CGEL ZTE)" <[email protected]>

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

Remove the redundant 'flush_workqueue()' calls.

---
 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +0 -1
index 76d3f0399964..60305c63c6f6 100644
@@ -1844,7 +1844,6 @@ int vchiq_mmal_finalise(struct vchiq_mmal_instance *instance)
 	mutex_unlock(&instance->vchiq_mutex);
 
 	vchiq_shutdown(instance->vchiq_instance);
-	flush_workqueue(instance->bulk_wq);
 	destroy_workqueue(instance->bulk_wq);
 
 	vfree(instance->bulk_scratch);
Signature · 1 line
2.25.1
#1 lore raw

Hi,

Am 27.01.22 um 02:44 schrieb [email protected]:

Quoted 6 lines

From: "Minghao Chi (CGEL ZTE)" <[email protected]>

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

Remove the redundant 'flush_workqueue()' calls.

are you sure that drain_workqueue() is the same as flush_workqueue()?

Quoted 20 lines
---
 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +0 -1
index 76d3f0399964..60305c63c6f6 100644
@@ -1844,7 +1844,6 @@ int vchiq_mmal_finalise(struct vchiq_mmal_instance *instance)
 	mutex_unlock(&instance->vchiq_mutex);
 
 	vchiq_shutdown(instance->vchiq_instance);
-	flush_workqueue(instance->bulk_wq);
 	destroy_workqueue(instance->bulk_wq);
 
 	vfree(instance->bulk_scratch);
#2 lore raw
Quoted 10 lines · Stefan Wahren

Hi,

Am 27.01.22 um 02:44 schrieb [email protected]:

Quoted 6 lines

From: "Minghao Chi (CGEL ZTE)" <[email protected]>

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

Remove the redundant 'flush_workqueue()' calls.

are you sure that drain_workqueue() is the same as flush_workqueue()?

drain_workqueue() calls flush_workqueue() repeatedly.

regards,
dan carpenter

#3 lore raw

Am 28.01.22 um 08:03 schrieb Dan Carpenter:

Quoted 12 lines · Stefan Wahren
Quoted 10 lines

Hi,

Am 27.01.22 um 02:44 schrieb [email protected]:

Quoted 6 lines

From: "Minghao Chi (CGEL ZTE)" <[email protected]>

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

Remove the redundant 'flush_workqueue()' calls.

are you sure that drain_workqueue() is the same as flush_workqueue()?

drain_workqueue() calls flush_workqueue() repeatedly.

sorry, i overlooked this

I'm fine with the patch

Quoted 9 lines

regards,
dan carpenter

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel