diff mbox series

s390/qeth: Remove redundant 'flush_workqueue()' calls

Message ID 20220114084218.42586-1-vulab@iscas.ac.cn (mailing list archive)
State Deferred
Delegated to: Netdev Maintainers
Headers show
Series s390/qeth: Remove redundant 'flush_workqueue()' calls | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Xu Wang Jan. 14, 2022, 8:42 a.m. UTC
'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/s390/net/qeth_l3_main.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Alexandra Winter Jan. 14, 2022, 11:58 a.m. UTC | #1
On 14.01.22 09:42, Xu Wang wrote:
> 'destroy_workqueue()' already drains the queue before destroying it, so
> there is no need to flush it explicitly.
> 
> Remove the redundant 'flush_workqueue()' calls.
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  drivers/s390/net/qeth_l3_main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
> index 9251ad276ee8..d2f422a9a4f7 100644
> --- a/drivers/s390/net/qeth_l3_main.c
> +++ b/drivers/s390/net/qeth_l3_main.c
> @@ -1961,7 +1961,6 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
>  	if (card->dev->reg_state == NETREG_REGISTERED)
>  		unregister_netdev(card->dev);
>  
> -	flush_workqueue(card->cmd_wq);
>  	destroy_workqueue(card->cmd_wq);
>  	qeth_l3_clear_ip_htable(card, 0);
>  	qeth_l3_clear_ipato_list(card);

Thanks for pointing this out!

IMO, this can go to net-next as it is not a fix, but removes redundancy.

Acked-by: Alexandra Winter <wintera@linux.ibm.com>
Jakub Kicinski Jan. 15, 2022, 2:25 a.m. UTC | #2
On Fri, 14 Jan 2022 12:58:38 +0100 Alexandra Winter wrote:
> On 14.01.22 09:42, Xu Wang wrote:
> > 'destroy_workqueue()' already drains the queue before destroying it, so
> > there is no need to flush it explicitly.
> > 
> > Remove the redundant 'flush_workqueue()' calls.
> > 
> > Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> > ---
> >  drivers/s390/net/qeth_l3_main.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
> > index 9251ad276ee8..d2f422a9a4f7 100644
> > --- a/drivers/s390/net/qeth_l3_main.c
> > +++ b/drivers/s390/net/qeth_l3_main.c
> > @@ -1961,7 +1961,6 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
> >  	if (card->dev->reg_state == NETREG_REGISTERED)
> >  		unregister_netdev(card->dev);
> >  
> > -	flush_workqueue(card->cmd_wq);
> >  	destroy_workqueue(card->cmd_wq);
> >  	qeth_l3_clear_ip_htable(card, 0);
> >  	qeth_l3_clear_ipato_list(card);  
> 
> Thanks for pointing this out!
> 
> IMO, this can go to net-next as it is not a fix, but removes redundancy.

Agreed.

> Acked-by: Alexandra Winter <wintera@linux.ibm.com>

Please keep Alexandra's ack and repost in ~1.5 week -- after 5.17-rc1
is tagged.
diff mbox series

Patch

diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 9251ad276ee8..d2f422a9a4f7 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1961,7 +1961,6 @@  static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
 	if (card->dev->reg_state == NETREG_REGISTERED)
 		unregister_netdev(card->dev);
 
-	flush_workqueue(card->cmd_wq);
 	destroy_workqueue(card->cmd_wq);
 	qeth_l3_clear_ip_htable(card, 0);
 	qeth_l3_clear_ipato_list(card);