netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Madalin Bucur <madalin.bucur@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Russell King <linux@armlinux.org.uk>, <netdev@vger.kernel.org>,
	<kernel@pengutronix.de>,
	Madalin Bucur <madalin.bucur@oss.nxp.com>,
	Michal Kubiak <michal.kubiak@intel.com>
Subject: Re: [PATCH net-next v2 1/8] net: dpaa: Improve error reporting
Date: Tue, 6 Jun 2023 19:03:31 +0200	[thread overview]
Message-ID: <ZH9m4wFPTWsXXBAD@boxer> (raw)
In-Reply-To: <20230606162829.166226-2-u.kleine-koenig@pengutronix.de>

On Tue, Jun 06, 2023 at 06:28:22PM +0200, Uwe Kleine-König wrote:
> Instead of the generic error message emitted by the driver core when a
> remove callback returns an error code ("remove callback returned a
> non-zero value. This will be ignored."), emit a message describing the
> actual problem and return zero to suppress the generic message.
> 
> Note that apart from suppressing the generic error message there are no
> side effects by changing the return value to zero. This prepares
> changing the remove callback to return void.
> 
> Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
> Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> index 431f8917dc39..6226c03cfca0 100644
> --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> @@ -3516,6 +3516,8 @@ static int dpaa_remove(struct platform_device *pdev)
>  	phylink_destroy(priv->mac_dev->phylink);
>  
>  	err = dpaa_fq_free(dev, &priv->dpaa_fq_list);
> +	if (err)
> +		dev_err(dev, "Failed to free FQs on remove\n");

so 'err' is now redundant - if you don't have any value in printing this
out then you could remove this variable altogether.

>  
>  	qman_delete_cgr_safe(&priv->ingress_cgr);
>  	qman_release_cgrid(priv->ingress_cgr.cgrid);
> @@ -3528,7 +3530,7 @@ static int dpaa_remove(struct platform_device *pdev)
>  
>  	free_netdev(net_dev);
>  
> -	return err;
> +	return 0;
>  }
>  
>  static const struct platform_device_id dpaa_devtype[] = {
> -- 
> 2.39.2
> 
> 

  reply	other threads:[~2023-06-06 17:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 16:28 [PATCH net-next v2 0/8] net: freescale: Convert to platform remove callback returning void Uwe Kleine-König
2023-06-06 16:28 ` [PATCH net-next v2 1/8] net: dpaa: Improve error reporting Uwe Kleine-König
2023-06-06 17:03   ` Maciej Fijalkowski [this message]
2023-06-07  6:42     ` Uwe Kleine-König
2023-06-07  7:58       ` Russell King (Oracle)
2023-06-06 16:28 ` [PATCH net-next v2 2/8] net: dpaa: Convert to platform remove callback returning void Uwe Kleine-König
2023-06-07 14:37   ` Simon Horman
2023-06-06 16:28 ` [PATCH net-next v2 3/8] net: fec: " Uwe Kleine-König
2023-06-07  6:48   ` Wei Fang
2023-06-07 14:39   ` Simon Horman
2023-06-06 16:28 ` [PATCH net-next v2 4/8] net: fman: " Uwe Kleine-König
2023-06-07 14:38   ` Simon Horman
2023-06-06 16:28 ` [PATCH net-next v2 5/8] net: fs_enet: " Uwe Kleine-König
2023-06-07 14:38   ` Simon Horman
2023-06-06 16:28 ` [PATCH net-next v2 6/8] net: fsl_pq_mdio: " Uwe Kleine-König
2023-06-07 14:38   ` Simon Horman
2023-06-06 16:28 ` [PATCH net-next v2 7/8] net: gianfar: " Uwe Kleine-König
2023-06-06 16:28 ` [PATCH net-next v2 8/8] net: ucc_geth: " Uwe Kleine-König
2023-06-07 14:36   ` Simon Horman

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=ZH9m4wFPTWsXXBAD@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=madalin.bucur@nxp.com \
    --cc=madalin.bucur@oss.nxp.com \
    --cc=michal.kubiak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 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).