diff mbox series

[1/1] media: intel/ipu6: Don't print user-triggerable errors to kernel log

Message ID 20240509183341.935400-1-sakari.ailus@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [1/1] media: intel/ipu6: Don't print user-triggerable errors to kernel log | expand

Commit Message

Sakari Ailus May 9, 2024, 6:33 p.m. UTC
Use dev_dbg() for printing messages on user-triggerable coditions that
have no relation to driver or hardware issues.

Fixes: 3c1dfb5a69cf ("media: intel/ipu6: input system video nodes and buffer queues")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Bingbu Cao May 10, 2024, 2:42 a.m. UTC | #1
Sakari,

Thanks for the patch.

------------------------------------------------------------------------
BRs,  
Bingbu Cao 

>-----Original Message-----
>From: Sakari Ailus <sakari.ailus@linux.intel.com>
>Sent: Friday, May 10, 2024 2:34 AM
>To: linux-media@vger.kernel.org
>Cc: Cao, Bingbu <bingbu.cao@intel.com>; Qiu, Tian Shu
><tian.shu.qiu@intel.com>
>Subject: [PATCH 1/1] media: intel/ipu6: Don't print user-triggerable
>errors to kernel log
>
>Use dev_dbg() for printing messages on user-triggerable coditions that

condition?

>have no relation to driver or hardware issues.
>
>Fixes: 3c1dfb5a69cf ("media: intel/ipu6: input system video nodes and
>buffer queues")
>Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>---
> drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
>b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
>index 11cd2c977abe..40a8ebfcfce2 100644
>--- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
>+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
>@@ -34,7 +34,7 @@ static int queue_setup(struct vb2_queue *q, unsigned
>int *num_buffers,
> 	if (!*num_planes) {
> 		sizes[0] = size;
> 	} else if (sizes[0] < size) {
>-		dev_err(dev, "%s: queue setup: size %u < %u\n",
>+		dev_dbg(dev, "%s: queue setup: size %u < %u\n",
> 			av->vdev.name, sizes[0], size);
> 		return -EINVAL;
> 	}
>@@ -359,7 +359,7 @@ static void buf_queue(struct vb2_buffer *vb)
> 	 */
> 	ret = buffer_list_get(stream, &bl);
> 	if (ret < 0) {
>-		dev_warn(dev, "No buffers available\n");
>+		dev_dbg(dev, "No buffers available\n");
> 		goto out;
> 	}
>
>@@ -426,7 +426,7 @@ static int ipu6_isys_link_fmt_validate(struct
>ipu6_isys_queue *aq)
>
> 	if (format.width != ipu6_isys_get_frame_width(av) ||
> 	    format.height != ipu6_isys_get_frame_height(av)) {
>-		dev_err(dev, "wrong width or height %ux%u (%ux%u
>expected)\n",
>+		dev_dbg(dev, "wrong width or height %ux%u (%ux%u
>expected)\n",
> 			ipu6_isys_get_frame_width(av),
> 			ipu6_isys_get_frame_height(av), format.width,
> 			format.height);
>@@ -521,13 +521,13 @@ static int start_streaming(struct vb2_queue *q,
>unsigned int count)
>
> 	ret = ipu6_isys_setup_video(av, &source_entity, &nr_queues);
> 	if (ret < 0) {
>-		dev_err(dev, "failed to setup video\n");
>+		dev_dbg(dev, "failed to setup video\n");
> 		goto out_return_buffers;
> 	}
>
> 	ret = ipu6_isys_link_fmt_validate(aq);
> 	if (ret) {
>-		dev_err(dev,
>+		dev_dbg(dev,
> 			"%s: link format validation failed (%d)\n",
> 			av->vdev.name, ret);
> 		goto out_pipeline_stop;

Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>

>--
>2.39.2
diff mbox series

Patch

diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
index 11cd2c977abe..40a8ebfcfce2 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
@@ -34,7 +34,7 @@  static int queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
 	if (!*num_planes) {
 		sizes[0] = size;
 	} else if (sizes[0] < size) {
-		dev_err(dev, "%s: queue setup: size %u < %u\n",
+		dev_dbg(dev, "%s: queue setup: size %u < %u\n",
 			av->vdev.name, sizes[0], size);
 		return -EINVAL;
 	}
@@ -359,7 +359,7 @@  static void buf_queue(struct vb2_buffer *vb)
 	 */
 	ret = buffer_list_get(stream, &bl);
 	if (ret < 0) {
-		dev_warn(dev, "No buffers available\n");
+		dev_dbg(dev, "No buffers available\n");
 		goto out;
 	}
 
@@ -426,7 +426,7 @@  static int ipu6_isys_link_fmt_validate(struct ipu6_isys_queue *aq)
 
 	if (format.width != ipu6_isys_get_frame_width(av) ||
 	    format.height != ipu6_isys_get_frame_height(av)) {
-		dev_err(dev, "wrong width or height %ux%u (%ux%u expected)\n",
+		dev_dbg(dev, "wrong width or height %ux%u (%ux%u expected)\n",
 			ipu6_isys_get_frame_width(av),
 			ipu6_isys_get_frame_height(av), format.width,
 			format.height);
@@ -521,13 +521,13 @@  static int start_streaming(struct vb2_queue *q, unsigned int count)
 
 	ret = ipu6_isys_setup_video(av, &source_entity, &nr_queues);
 	if (ret < 0) {
-		dev_err(dev, "failed to setup video\n");
+		dev_dbg(dev, "failed to setup video\n");
 		goto out_return_buffers;
 	}
 
 	ret = ipu6_isys_link_fmt_validate(aq);
 	if (ret) {
-		dev_err(dev,
+		dev_dbg(dev,
 			"%s: link format validation failed (%d)\n",
 			av->vdev.name, ret);
 		goto out_pipeline_stop;