kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Jason Gunthorpe <jgg@ziepe.ca>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Diana Craciun <diana.craciun@oss.nxp.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH] vfio/fsl-mc: Fix a typo in a comment
Date: Mon, 22 Aug 2022 11:14:38 +0200	[thread overview]
Message-ID: <871qt8prlt.fsf@redhat.com> (raw)
In-Reply-To: <Yvuy/qUwU7StueDV@ziepe.ca>

On Tue, Aug 16 2022, Jason Gunthorpe <jgg@ziepe.ca> wrote:

> 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@wanadoo.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.

Having to decide between losing the WARN and losing the device info, I'd
just... fix the typo :)


      reply	other threads:[~2022-08-22  9:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-06 19:56 [PATCH] vfio/fsl-mc: Fix a typo in a comment Christophe JAILLET
2022-08-08  9:57 ` Cornelia Huck
2022-08-09 16:20 ` Jason Gunthorpe
2022-08-16 15:00   ` Christophe JAILLET
2022-08-16 15:08     ` Jason Gunthorpe
2022-08-22  9:14       ` Cornelia Huck [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=871qt8prlt.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=diana.craciun@oss.nxp.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).