linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] octeontx2-af: Fix error code in rvu_mbox_init()
@ 2025-06-25 15:23 Dan Carpenter
  2025-06-26  6:34 ` Subbaraya Sundeep
  2025-06-29  9:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-06-25 15:23 UTC (permalink / raw)
  To: Sai Krishna
  Cc: Sunil Goutham, Linu Cherian, Geetha sowjanya, Jerin Jacob,
	hariprasad, Subbaraya Sundeep, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
	kernel-janitors

The error code was intended to be -EINVAL here, but it was accidentally
changed to returning success.  Set the error code.

Fixes: e53ee4acb220 ("octeontx2-af: CN20k basic mbox operations and structures")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index 7e538ee8a59f..c6bb3aaa8e0d 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -2458,9 +2458,9 @@ static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw,
 			 void (mbox_handler)(struct work_struct *),
 			 void (mbox_up_handler)(struct work_struct *))
 {
-	int err = -EINVAL, i, dir, dir_up;
 	void __iomem **mbox_regions;
 	struct ng_rvu *ng_rvu_mbox;
+	int err, i, dir, dir_up;
 	void __iomem *reg_base;
 	struct rvu_work *mwork;
 	unsigned long *pf_bmap;
@@ -2526,6 +2526,7 @@ static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw,
 			goto free_regions;
 		break;
 	default:
+		err = -EINVAL;
 		goto free_regions;
 	}
 
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] octeontx2-af: Fix error code in rvu_mbox_init()
  2025-06-25 15:23 [PATCH net-next] octeontx2-af: Fix error code in rvu_mbox_init() Dan Carpenter
@ 2025-06-26  6:34 ` Subbaraya Sundeep
  2025-06-26  9:13   ` Simon Horman
  2025-06-29  9:40 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Subbaraya Sundeep @ 2025-06-26  6:34 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Sai Krishna, Sunil Goutham, Linu Cherian, Geetha sowjanya,
	Jerin Jacob, hariprasad, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
	kernel-janitors

On 2025-06-25 at 15:23:05, Dan Carpenter (dan.carpenter@linaro.org) wrote:
> The error code was intended to be -EINVAL here, but it was accidentally
> changed to returning success.  Set the error code.
> 
> Fixes: e53ee4acb220 ("octeontx2-af: CN20k basic mbox operations and structures")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

 Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>

 Thanks for the patch. This has been pointed by Simon earlier:
 https://lore.kernel.org/all/20250618194301.GA1699@horms.kernel.org/

 Thanks,
 Sundeep

> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
> index 7e538ee8a59f..c6bb3aaa8e0d 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
> @@ -2458,9 +2458,9 @@ static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw,
>  			 void (mbox_handler)(struct work_struct *),
>  			 void (mbox_up_handler)(struct work_struct *))
>  {
> -	int err = -EINVAL, i, dir, dir_up;
>  	void __iomem **mbox_regions;
>  	struct ng_rvu *ng_rvu_mbox;
> +	int err, i, dir, dir_up;
>  	void __iomem *reg_base;
>  	struct rvu_work *mwork;
>  	unsigned long *pf_bmap;
> @@ -2526,6 +2526,7 @@ static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw,
>  			goto free_regions;
>  		break;
>  	default:
> +		err = -EINVAL;
>  		goto free_regions;
>  	}
>  
> -- 
> 2.47.2
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] octeontx2-af: Fix error code in rvu_mbox_init()
  2025-06-26  6:34 ` Subbaraya Sundeep
@ 2025-06-26  9:13   ` Simon Horman
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2025-06-26  9:13 UTC (permalink / raw)
  To: Subbaraya Sundeep
  Cc: Dan Carpenter, Sai Krishna, Sunil Goutham, Linu Cherian,
	Geetha sowjanya, Jerin Jacob, hariprasad, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel, kernel-janitors

On Thu, Jun 26, 2025 at 06:34:23AM +0000, Subbaraya Sundeep wrote:
> On 2025-06-25 at 15:23:05, Dan Carpenter (dan.carpenter@linaro.org) wrote:
> > The error code was intended to be -EINVAL here, but it was accidentally
> > changed to returning success.  Set the error code.
> > 
> > Fixes: e53ee4acb220 ("octeontx2-af: CN20k basic mbox operations and structures")
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> 
>  Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
> 
>  Thanks for the patch. This has been pointed by Simon earlier:
>  https://lore.kernel.org/all/20250618194301.GA1699@horms.kernel.org/

Thanks for the fix.

Reviewed-by: Simon Horman <horms@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] octeontx2-af: Fix error code in rvu_mbox_init()
  2025-06-25 15:23 [PATCH net-next] octeontx2-af: Fix error code in rvu_mbox_init() Dan Carpenter
  2025-06-26  6:34 ` Subbaraya Sundeep
@ 2025-06-29  9:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-29  9:40 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: saikrishnag, sgoutham, lcherian, gakula, jerinj, hkelam, sbhatta,
	andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel, kernel-janitors

Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 25 Jun 2025 10:23:05 -0500 you wrote:
> The error code was intended to be -EINVAL here, but it was accidentally
> changed to returning success.  Set the error code.
> 
> Fixes: e53ee4acb220 ("octeontx2-af: CN20k basic mbox operations and structures")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] octeontx2-af: Fix error code in rvu_mbox_init()
    https://git.kernel.org/netdev/net-next/c/20a0c20f82ac

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-29  9:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-25 15:23 [PATCH net-next] octeontx2-af: Fix error code in rvu_mbox_init() Dan Carpenter
2025-06-26  6:34 ` Subbaraya Sundeep
2025-06-26  9:13   ` Simon Horman
2025-06-29  9:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).