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

L and S are swapped in the message.
s/VFIO_FLS_MC/VFIO_FSL_MC/

Also use WARN instead of WARN_ON+dev_warn because WARN can already print
the message.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Changes in v2:
  * s/comment/message/ in the subject   [Cornelia Huck <cohuck@redhat.com>]
  * use WARN instead of WARN_ON+dev_warn   [Jason Gunthorpe <jgg@ziepe.ca>]

v1:
  https://lore.kernel.org/all/2b65bf8d2b4d940cafbafcede07c23c35f042f5a.1659815764.git.christophe.jaillet@wanadoo.fr/
---
 drivers/vfio/fsl-mc/vfio_fsl_mc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 3feff729f3ce..57774009e0eb 100644
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
@@ -108,9 +108,7 @@ static void vfio_fsl_mc_close_device(struct vfio_device *core_vdev)
 	/* reset the device before cleaning up the interrupts */
 	ret = vfio_fsl_mc_reset_device(vdev);
 
-	if (WARN_ON(ret))
-		dev_warn(&mc_cont->dev,
-			 "VFIO_FLS_MC: reset device has failed (%d)\n", ret);
+	WARN(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] 5+ messages in thread

* Re: [PATCH v2] vfio/fsl-mc: Fix a typo in a message
  2022-08-16 15:24 [PATCH v2] vfio/fsl-mc: Fix a typo in a message Christophe JAILLET
@ 2022-08-16 15:46 ` Jason Gunthorpe
  2022-08-22  9:19 ` Cornelia Huck
  1 sibling, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2022-08-16 15:46 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:24:46PM +0200, Christophe JAILLET wrote:
> L and S are swapped in the message.
> s/VFIO_FLS_MC/VFIO_FSL_MC/
> 
> Also use WARN instead of WARN_ON+dev_warn because WARN can already print
> the message.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

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

* Re: [PATCH v2] vfio/fsl-mc: Fix a typo in a message
  2022-08-16 15:24 [PATCH v2] vfio/fsl-mc: Fix a typo in a message Christophe JAILLET
  2022-08-16 15:46 ` Jason Gunthorpe
@ 2022-08-22  9:19 ` Cornelia Huck
  2022-08-25 21:01   ` Alex Williamson
  1 sibling, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2022-08-22  9:19 UTC (permalink / raw)
  To: Christophe JAILLET, Diana Craciun, Alex Williamson
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, kvm

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

> L and S are swapped in the message.
> s/VFIO_FLS_MC/VFIO_FSL_MC/
>
> Also use WARN instead of WARN_ON+dev_warn because WARN can already print
> the message.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Changes in v2:
>   * s/comment/message/ in the subject   [Cornelia Huck <cohuck@redhat.com>]
>   * use WARN instead of WARN_ON+dev_warn   [Jason Gunthorpe <jgg@ziepe.ca>]
>
> v1:
>   https://lore.kernel.org/all/2b65bf8d2b4d940cafbafcede07c23c35f042f5a.1659815764.git.christophe.jaillet@wanadoo.fr/
> ---
>  drivers/vfio/fsl-mc/vfio_fsl_mc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> index 3feff729f3ce..57774009e0eb 100644
> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> @@ -108,9 +108,7 @@ static void vfio_fsl_mc_close_device(struct vfio_device *core_vdev)
>  	/* reset the device before cleaning up the interrupts */
>  	ret = vfio_fsl_mc_reset_device(vdev);
>  
> -	if (WARN_ON(ret))
> -		dev_warn(&mc_cont->dev,
> -			 "VFIO_FLS_MC: reset device has failed (%d)\n", ret);
> +	WARN(ret, "VFIO_FSL_MC: reset device has failed (%d)\n", ret);

Hm, but this drops the device information, not such a fan... maybe the
author can chime in?

>  
>  	vfio_fsl_mc_irqs_cleanup(vdev);
>  


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

* Re: [PATCH v2] vfio/fsl-mc: Fix a typo in a message
  2022-08-22  9:19 ` Cornelia Huck
@ 2022-08-25 21:01   ` Alex Williamson
  2022-08-26 12:05     ` Diana Madalina Craciun
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Williamson @ 2022-08-25 21:01 UTC (permalink / raw)
  To: Diana Craciun
  Cc: Cornelia Huck, Christophe JAILLET, linux-kernel, kernel-janitors, kvm

On Mon, 22 Aug 2022 11:19:57 +0200
Cornelia Huck <cohuck@redhat.com> wrote:

> On Tue, Aug 16 2022, Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> 
> > L and S are swapped in the message.
> > s/VFIO_FLS_MC/VFIO_FSL_MC/
> >
> > Also use WARN instead of WARN_ON+dev_warn because WARN can already print
> > the message.
> >
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > ---
> > Changes in v2:
> >   * s/comment/message/ in the subject   [Cornelia Huck <cohuck@redhat.com>]
> >   * use WARN instead of WARN_ON+dev_warn   [Jason Gunthorpe <jgg@ziepe.ca>]
> >
> > v1:
> >   https://lore.kernel.org/all/2b65bf8d2b4d940cafbafcede07c23c35f042f5a.1659815764.git.christophe.jaillet@wanadoo.fr/
> > ---
> >  drivers/vfio/fsl-mc/vfio_fsl_mc.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> > index 3feff729f3ce..57774009e0eb 100644
> > --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> > +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> > @@ -108,9 +108,7 @@ static void vfio_fsl_mc_close_device(struct vfio_device *core_vdev)
> >  	/* reset the device before cleaning up the interrupts */
> >  	ret = vfio_fsl_mc_reset_device(vdev);
> >  
> > -	if (WARN_ON(ret))
> > -		dev_warn(&mc_cont->dev,
> > -			 "VFIO_FLS_MC: reset device has failed (%d)\n", ret);
> > +	WARN(ret, "VFIO_FSL_MC: reset device has failed (%d)\n", ret);  
> 
> Hm, but this drops the device information, not such a fan... maybe the
> author can chime in?

Diana, what do you want to do here?  Thanks,

Alex


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

* Re: [PATCH v2] vfio/fsl-mc: Fix a typo in a message
  2022-08-25 21:01   ` Alex Williamson
@ 2022-08-26 12:05     ` Diana Madalina Craciun
  0 siblings, 0 replies; 5+ messages in thread
From: Diana Madalina Craciun @ 2022-08-26 12:05 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Cornelia Huck, Christophe JAILLET, linux-kernel, kernel-janitors, kvm



On 8/26/2022 12:01 AM, Alex Williamson wrote:
> On Mon, 22 Aug 2022 11:19:57 +0200
> Cornelia Huck <cohuck@redhat.com> wrote:
>
>> On Tue, Aug 16 2022, Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
>>
>>> L and S are swapped in the message.
>>> s/VFIO_FLS_MC/VFIO_FSL_MC/
>>>
>>> Also use WARN instead of WARN_ON+dev_warn because WARN can already print
>>> the message.
>>>
>>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>>> ---
>>> Changes in v2:
>>>    * s/comment/message/ in the subject   [Cornelia Huck <cohuck@redhat.com>]
>>>    * use WARN instead of WARN_ON+dev_warn   [Jason Gunthorpe <jgg@ziepe.ca>]
>>>
>>> v1:
>>>    https://lore.kernel.org/all/2b65bf8d2b4d940cafbafcede07c23c35f042f5a.1659815764.git.christophe.jaillet@wanadoo.fr/
>>> ---
>>>   drivers/vfio/fsl-mc/vfio_fsl_mc.c | 4 +---
>>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
>>> index 3feff729f3ce..57774009e0eb 100644
>>> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
>>> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
>>> @@ -108,9 +108,7 @@ static void vfio_fsl_mc_close_device(struct vfio_device *core_vdev)
>>>   	/* reset the device before cleaning up the interrupts */
>>>   	ret = vfio_fsl_mc_reset_device(vdev);
>>>   
>>> -	if (WARN_ON(ret))
>>> -		dev_warn(&mc_cont->dev,
>>> -			 "VFIO_FLS_MC: reset device has failed (%d)\n", ret);
>>> +	WARN(ret, "VFIO_FSL_MC: reset device has failed (%d)\n", ret);
>> Hm, but this drops the device information, not such a fan... maybe the
>> author can chime in?
> Diana, what do you want to do here?  Thanks,

I would prefer to keep the device information. So, I am OK with 
something like:

if (ret)
     dev_warn(&mc_cont->dev,
          "VFIO_FSL_MC: reset device has failed (%d)\n", ret);

Thanks,
Diana


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

end of thread, other threads:[~2022-08-26 12:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 15:24 [PATCH v2] vfio/fsl-mc: Fix a typo in a message Christophe JAILLET
2022-08-16 15:46 ` Jason Gunthorpe
2022-08-22  9:19 ` Cornelia Huck
2022-08-25 21:01   ` Alex Williamson
2022-08-26 12:05     ` Diana Madalina Craciun

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