linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfio/fsl-mc: Fix a typo in a comment
@ 2022-08-06 19:56 Christophe JAILLET
  2022-08-08  9:57 ` Cornelia Huck
  2022-08-09 16:20 ` Jason Gunthorpe
  0 siblings, 2 replies; 6+ messages in thread
From: Christophe JAILLET @ 2022-08-06 19:56 UTC (permalink / raw)
  To: Diana Craciun, Alex Williamson, Cornelia Huck
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, kvm

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);
 
 	vfio_fsl_mc_irqs_cleanup(vdev);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/fsl-mc: Fix a typo in a comment
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2022-08-08  9:57 UTC (permalink / raw)
  To: Christophe JAILLET, Diana Craciun, Alex Williamson
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, kvm

On Sat, Aug 06 2022, Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

$SUBJECT: s/comment/message/

> 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?

From a quick glance, there seem to be messages for when the device is
_not_ bound to the fsl-mc driver (e.g. in vfio_fsl_mc_bus_notifier());
I'd just fix the typo for now.

> ---
>  drivers/vfio/fsl-mc/vfio_fsl_mc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Cornelia Huck <cohuck@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/fsl-mc: Fix a typo in a comment
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2022-08-09 16:20 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Diana Craciun, Alex Williamson, Cornelia Huck, linux-kernel,
	kernel-janitors, kvm

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);

Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/fsl-mc: Fix a typo in a comment
  2022-08-09 16:20 ` Jason Gunthorpe
@ 2022-08-16 15:00   ` Christophe JAILLET
  2022-08-16 15:08     ` Jason Gunthorpe
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe JAILLET @ 2022-08-16 15:00 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Diana Craciun, Alex Williamson, Cornelia Huck, linux-kernel,
	kernel-janitors, kvm

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()?

CJ


> 
> Jason
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/fsl-mc: Fix a typo in a comment
  2022-08-16 15:00   ` Christophe JAILLET
@ 2022-08-16 15:08     ` Jason Gunthorpe
  2022-08-22  9:14       ` Cornelia Huck
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2022-08-16 15:08 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Diana Craciun, Alex Williamson, Cornelia Huck, linux-kernel,
	kernel-janitors, kvm

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.

Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/fsl-mc: Fix a typo in a comment
  2022-08-16 15:08     ` Jason Gunthorpe
@ 2022-08-22  9:14       ` Cornelia Huck
  0 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2022-08-22  9:14 UTC (permalink / raw)
  To: Jason Gunthorpe, Christophe JAILLET
  Cc: Diana Craciun, Alex Williamson, linux-kernel, kernel-janitors, kvm

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 :)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-22  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).