lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR04MB39768E58DEFE24FB41C107EBECB99@AM6PR04MB3976.eurprd04.prod.outlook.com>
Date:   Mon, 13 Mar 2023 11:12:53 +0000
From:   Madalin Bucur <madalin.bucur@....com>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Russell King <linux@...linux.org.uk>,
        Camelia Alexandra Groza <camelia.groza@....com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>
Subject: RE: [PATCH net-next 1/9] net: dpaa: Improve error reporting


> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> Sent: 13 March 2023 12:37
> To: Madalin Bucur <madalin.bucur@....com>; David S. Miller
> <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub Kicinski
> <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Russell King
> <linux@...linux.org.uk>
> Cc: netdev@...r.kernel.org; kernel@...gutronix.de
> Subject: [PATCH net-next 1/9] net: dpaa: Improve error reporting
> 
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.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 9318a2554056..97cad3750096 100644
> --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> @@ -3520,6 +3520,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(&pdev->dev, "Failed to free FQs on remove\n");

You have a bit before dev = &pdev->dev; so you can write just as well:
+		dev_err(dev, "Failed to free FQs on remove\n");

With or without this minor nit pick fixed,

Acked-by: Madalin Bucur <madalin.bucur@....nxp.com>

> 
>  	qman_delete_cgr_safe(&priv->ingress_cgr);
>  	qman_release_cgrid(priv->ingress_cgr.cgrid);
> @@ -3532,7 +3534,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.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ