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]
Date:   Tue, 16 Aug 2022 12:08:46 -0300
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Diana Craciun <diana.craciun@....nxp.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Cornelia Huck <cohuck@...hat.com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        kvm@...r.kernel.org
Subject: Re: [PATCH] vfio/fsl-mc: Fix a typo in a comment

On Tue, Aug 16, 2022 at 05:00:50PM +0200, Christophe JAILLET wrote:
> Le 09/08/2022 à 18:20, Jason Gunthorpe a écrit :
> > On Sat, Aug 06, 2022 at 09:56:13PM +0200, Christophe JAILLET wrote:
> > > L and S are swapped/
> > > s/VFIO_FLS_MC/VFIO_FSL_MC/
> > > 
> > > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > > ---
> > > All the dev_ logging functions in the file have the "VFIO_FSL_MC: "
> > > prefix.
> > > As they are dev_ function, the driver should already be displayed.
> > > 
> > > So, does it make sense or could they be all removed?
> > > ---
> > >   drivers/vfio/fsl-mc/vfio_fsl_mc.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> > > index 3feff729f3ce..66d01db1d240 100644
> > > --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> > > +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> > > @@ -110,7 +110,7 @@ static void vfio_fsl_mc_close_device(struct vfio_device *core_vdev)
> > >   	if (WARN_ON(ret))
> > >   		dev_warn(&mc_cont->dev,
> > > -			 "VFIO_FLS_MC: reset device has failed (%d)\n", ret);
> > > +			 "VFIO_FSL_MC: reset device has failed (%d)\n", ret);
> > 
> > WARN_ON already prints, this is better written as
> > 
> > WARN(ret, "VFIO_FSL_MC: reset device has failed (%d)\n", ret);
> 
> Or maybe, just:
> if (ret)
> 	dev_warn(&mc_cont->dev,
> 		 "VFIO_FSL_MC: reset device has failed (%d)\n", ret);
> 
> This keep information about the device, avoid the duplicate printing related
> to WARN_ON+dev_warn and is more in line with error handling in other files.
> 
> Do you agree or do you prefer a v2 as you proposed with WARN()?

If the original author wrote WARN I would not degrade it to just a
dev_warn.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ