[v10,19/21] uvcvideo: don't spam the log in uvc_ctrl_restore_values()

Message ID 20210618122923.385938-20-ribalda@chromium.org (mailing list archive)
State Accepted, archived
Delegated to: Laurent Pinchart
Headers
Series Fix v4l2-compliance errors |

Commit Message

Ricardo Ribalda June 18, 2021, 12:29 p.m. UTC
  From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Don't report the restored controls with dev_info, use dev_dbg instead.
This prevents a lot of noise in the kernel log.

Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/usb/uvc/uvc_ctrl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Laurent Pinchart Aug. 22, 2021, 11:23 p.m. UTC | #1
Hello,

A quick note, I'll update the subject with a "media: ".

On Fri, Jun 18, 2021 at 02:29:21PM +0200, Ricardo Ribalda wrote:
> From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> 
> Don't report the restored controls with dev_info, use dev_dbg instead.
> This prevents a lot of noise in the kernel log.
> 
> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
>  drivers/media/usb/uvc/uvc_ctrl.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> index 11c25d4b5c20..da44d5c0b9ad 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -2153,10 +2153,10 @@ int uvc_ctrl_restore_values(struct uvc_device *dev)
>  			if (!ctrl->initialized || !ctrl->modified ||
>  			    (ctrl->info.flags & UVC_CTRL_FLAG_RESTORE) == 0)
>  				continue;
> -			dev_info(&dev->udev->dev,
> -				 "restoring control %pUl/%u/%u\n",
> -				 ctrl->info.entity, ctrl->info.index,
> -				 ctrl->info.selector);
> +			dev_dbg(&dev->udev->dev,
> +				"restoring control %pUl/%u/%u\n",
> +				ctrl->info.entity, ctrl->info.index,
> +				ctrl->info.selector);
>  			ctrl->dirty = 1;
>  		}
>
  
Laurent Pinchart Aug. 23, 2021, 12:17 a.m. UTC | #2
Hi Hans,

On Fri, Jun 18, 2021 at 02:29:21PM +0200, Ricardo Ribalda wrote:
> From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> 
> Don't report the restored controls with dev_info, use dev_dbg instead.
> This prevents a lot of noise in the kernel log.
> 
> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

The author and SoB line don't match. Which one should I update ?

> ---
>  drivers/media/usb/uvc/uvc_ctrl.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> index 11c25d4b5c20..da44d5c0b9ad 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -2153,10 +2153,10 @@ int uvc_ctrl_restore_values(struct uvc_device *dev)
>  			if (!ctrl->initialized || !ctrl->modified ||
>  			    (ctrl->info.flags & UVC_CTRL_FLAG_RESTORE) == 0)
>  				continue;
> -			dev_info(&dev->udev->dev,
> -				 "restoring control %pUl/%u/%u\n",
> -				 ctrl->info.entity, ctrl->info.index,
> -				 ctrl->info.selector);
> +			dev_dbg(&dev->udev->dev,
> +				"restoring control %pUl/%u/%u\n",
> +				ctrl->info.entity, ctrl->info.index,
> +				ctrl->info.selector);
>  			ctrl->dirty = 1;
>  		}
>
  
Hans Verkuil Aug. 23, 2021, 7:32 a.m. UTC | #3
On 23/08/2021 02:17, Laurent Pinchart wrote:
> Hi Hans,
> 
> On Fri, Jun 18, 2021 at 02:29:21PM +0200, Ricardo Ribalda wrote:
>> From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
>>
>> Don't report the restored controls with dev_info, use dev_dbg instead.
>> This prevents a lot of noise in the kernel log.
>>
>> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> 
> The author and SoB line don't match. Which one should I update ?

SoB should use <hverkuil-cisco@xs4all.nl>

Regards,

	Hans

> 
>> ---
>>  drivers/media/usb/uvc/uvc_ctrl.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
>> index 11c25d4b5c20..da44d5c0b9ad 100644
>> --- a/drivers/media/usb/uvc/uvc_ctrl.c
>> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
>> @@ -2153,10 +2153,10 @@ int uvc_ctrl_restore_values(struct uvc_device *dev)
>>  			if (!ctrl->initialized || !ctrl->modified ||
>>  			    (ctrl->info.flags & UVC_CTRL_FLAG_RESTORE) == 0)
>>  				continue;
>> -			dev_info(&dev->udev->dev,
>> -				 "restoring control %pUl/%u/%u\n",
>> -				 ctrl->info.entity, ctrl->info.index,
>> -				 ctrl->info.selector);
>> +			dev_dbg(&dev->udev->dev,
>> +				"restoring control %pUl/%u/%u\n",
>> +				ctrl->info.entity, ctrl->info.index,
>> +				ctrl->info.selector);
>>  			ctrl->dirty = 1;
>>  		}
>>  
>
  

Patch

diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 11c25d4b5c20..da44d5c0b9ad 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -2153,10 +2153,10 @@  int uvc_ctrl_restore_values(struct uvc_device *dev)
 			if (!ctrl->initialized || !ctrl->modified ||
 			    (ctrl->info.flags & UVC_CTRL_FLAG_RESTORE) == 0)
 				continue;
-			dev_info(&dev->udev->dev,
-				 "restoring control %pUl/%u/%u\n",
-				 ctrl->info.entity, ctrl->info.index,
-				 ctrl->info.selector);
+			dev_dbg(&dev->udev->dev,
+				"restoring control %pUl/%u/%u\n",
+				ctrl->info.entity, ctrl->info.index,
+				ctrl->info.selector);
 			ctrl->dirty = 1;
 		}