Message ID | 20250324080854.408188-1-nichen@iscas.ac.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | b2d1e4c2cb8a27693acd1add5ef7295a976a63dd |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] octeontx2-af: mcs: Remove redundant 'flush_workqueue()' calls | expand |
>-----Original Message----- >From: Chen Ni <nichen@iscas.ac.cn> >Sent: Monday, March 24, 2025 1:39 PM >To: Sunil Kovvuri Goutham <sgoutham@marvell.com>; Linu Cherian ><lcherian@marvell.com>; Geethasowjanya Akula <gakula@marvell.com>; Jerin >Jacob <jerinj@marvell.com>; Hariprasad Kelam <hkelam@marvell.com>; >Subbaraya Sundeep Bhatta <sbhatta@marvell.com>; andrew+netdev@lunn.ch; >davem@davemloft.net; edumazet@google.com; kuba@kernel.org; >pabeni@redhat.com >Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Chen Ni ><nichen@iscas.ac.cn> >Subject: [EXTERNAL] [PATCH net-next] octeontx2-af: mcs: 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: Chen Ni <nichen@iscas.ac.cn> >--- > drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 1 - > 1 file changed, 1 deletion(-) > >diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c >b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c >index d39d86e694cc..655dd4726d36 100644 >--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c >+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c >@@ -925,7 +925,6 @@ void rvu_mcs_exit(struct rvu *rvu) > if (!rvu->mcs_intr_wq) > return; > >- flush_workqueue(rvu->mcs_intr_wq); > destroy_workqueue(rvu->mcs_intr_wq); > rvu->mcs_intr_wq = NULL; > } >-- >2.25.1 Thanks for the fix. Reviewed-by: Geetha sowjanya <gakula@marvell.com>
On Mon, Mar 24, 2025 at 04:08:54PM +0800, Chen Ni 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. > > This was generated with coccinelle: > > @@ > expression E; > @@ > > - flush_workqueue(E); > destroy_workqueue(E); > > Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Simon Horman <horms@kernel.org>
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Mon, 24 Mar 2025 16:08:54 +0800 you 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. > > This was generated with coccinelle: > > [...] Here is the summary with links: - [net-next] octeontx2-af: mcs: Remove redundant 'flush_workqueue()' calls https://git.kernel.org/netdev/net-next/c/b2d1e4c2cb8a You are awesome, thank you!
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c index d39d86e694cc..655dd4726d36 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c @@ -925,7 +925,6 @@ void rvu_mcs_exit(struct rvu *rvu) if (!rvu->mcs_intr_wq) return; - flush_workqueue(rvu->mcs_intr_wq); destroy_workqueue(rvu->mcs_intr_wq); rvu->mcs_intr_wq = NULL; }
'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> --- drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 1 - 1 file changed, 1 deletion(-)