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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 7 Jun 2023 08:58:40 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
	Madalin Bucur <madalin.bucur@....com>,
	Madalin Bucur <madalin.bucur@....nxp.com>, netdev@...r.kernel.org,
	Eric Dumazet <edumazet@...gle.com>,
	Michal Kubiak <michal.kubiak@...el.com>, kernel@...gutronix.de,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next v2 1/8] net: dpaa: Improve error reporting

On Wed, Jun 07, 2023 at 08:42:35AM +0200, Uwe Kleine-König wrote:
> On Tue, Jun 06, 2023 at 07:03:31PM +0200, Maciej Fijalkowski wrote:
> > 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@....nxp.com>
> > > Reviewed-by: Michal Kubiak <michal.kubiak@...el.com>
> > > 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 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.
> 
> Good hint, err can have different values here (at least -EINVAL and
> -EBUSY), so printing it has some values. I'll wait a bit for more
> feedback to this series and then prepare a v3 with
> 
> 	dev_err(dev, "Failed to free FQs on remove (%pE)\n", err);

							     ERR_PTR(err)

%p formats always take a pointer.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ