All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Edward Cree <ecree.xilinx@gmail.com>
Cc: Alejandro Lucero <alejandro.lucero-palau@amd.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Martin Habets <habetsm.xilinx@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	netdev@vger.kernel.org, linux-net-drivers@amd.com,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net] sfc: fix error code in efx_devlink_info_running_versions()
Date: Tue, 28 Apr 2026 16:49:48 +0300	[thread overview]
Message-ID: <afC6_N4cCewJrkis@stanley.mountain> (raw)
In-Reply-To: <0dd0c884-c846-4f17-986d-fb24b21a836f@gmail.com>

On Tue, Apr 28, 2026 at 02:36:55PM +0100, Edward Cree wrote:
> On 25/04/2026 10:09, Dan Carpenter wrote:
> > Return -EINVAL if efx_mcdi_rpc() doesn't return enough space.
> > 
> > Fixes: 14743ddd2495 ("sfc: add devlink info support for ef100")
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> > ---
> >  drivers/net/ethernet/sfc/efx_devlink.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/ethernet/sfc/efx_devlink.c b/drivers/net/ethernet/sfc/efx_devlink.c
> > index d842c60dfc10..45f412bb9b5d 100644
> > --- a/drivers/net/ethernet/sfc/efx_devlink.c
> > +++ b/drivers/net/ethernet/sfc/efx_devlink.c
> > @@ -531,7 +531,7 @@ static int efx_devlink_info_running_versions(struct efx_nic *efx,
> >  	if (rc || outlength < MC_CMD_GET_VERSION_OUT_LEN) {
> >  		netif_err(efx, drv, efx->net_dev,
> >  			  "mcdi MC_CMD_GET_VERSION failed\n");
> > -		return rc;
> > +		return rc ?: -EINVAL;
> >  	}
> >  
> >  	/* Handle previous output */
> 
> Usual practice in sfc is to use -EIO for 'MC response was too short'; it
>  signifies misbehaviour from the hardware, not any invalid input argument
>  as -EINVAL would suggest.
> Other than that, looks fine.

Sure, I'll send a v2.

regards,
dan carpenter


      reply	other threads:[~2026-04-28 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-25  9:09 [PATCH net] sfc: fix error code in efx_devlink_info_running_versions() Dan Carpenter
2026-04-28 13:08 ` Simon Horman
2026-04-28 13:36 ` Edward Cree
2026-04-28 13:49   ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afC6_N4cCewJrkis@stanley.mountain \
    --to=error27@gmail.com \
    --cc=alejandro.lucero-palau@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.