mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Eugen.Hristev@microchip.com>
To: <linux-media@vger.kernel.org>, <hverkuil@xs4all.nl>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Cc: <Nicolas.Ferre@microchip.com>, <mchehab@kernel.org>,
	<ksloat@aampglobal.com>, <Eugen.Hristev@microchip.com>
Subject: [PATCH v2 4/4] media: atmel: atmel-isc: make try_fmt error less verbose
Date: Mon, 15 Apr 2019 14:13:56 +0000	[thread overview]
Message-ID: <1555337305-13767-5-git-send-email-eugen.hristev@microchip.com> (raw)
In-Reply-To: <1555337305-13767-1-git-send-email-eugen.hristev@microchip.com>

From: Eugen Hristev <eugen.hristev@microchip.com>

In case the sensor refuses to set the format, avoid printing the error
message that no compatible format was found.
This means that the try_fmt will be less verbose.
The error will be printed only if really a format cannot be found.
Some application try all possible formats in a row (gstreamer e.g.)
which will flood the console with error messages until a working one is found.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 drivers/media/platform/atmel/atmel-isc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index 777e27f..da3b441 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1487,7 +1487,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f,
 	ret = v4l2_subdev_call(isc->current_subdev->sd, pad, set_fmt,
 			       &pad_cfg, &format);
 	if (ret < 0)
-		goto isc_try_fmt_err;
+		goto isc_try_fmt_subdev_err;
 
 	v4l2_fill_pix_format(pixfmt, &format.format);
 
@@ -1502,6 +1502,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f,
 
 isc_try_fmt_err:
 	v4l2_err(&isc->v4l2_dev, "Could not find any possible format for a working pipeline\n");
+isc_try_fmt_subdev_err:
 	memset(&isc->try_config, 0, sizeof(isc->try_config));
 
 	return ret;
-- 
2.7.4


      parent reply	other threads:[~2019-04-15 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 14:13 [PATCH v2 0/4] media: atmel: atmel-isc: new features Eugen.Hristev
2019-04-15 14:13 ` [PATCH v2 1/4] media: atmel: atmel-isc: reworked white balance feature Eugen.Hristev
2019-04-15 14:13 ` [PATCH v2 2/4] media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE Eugen.Hristev
2019-04-15 14:13 ` [PATCH v2 3/4] media: atmel: atmel-isc: add support " Eugen.Hristev
2019-04-15 14:13 ` Eugen.Hristev [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=1555337305-13767-5-git-send-email-eugen.hristev@microchip.com \
    --to=eugen.hristev@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=hverkuil@xs4all.nl \
    --cc=ksloat@aampglobal.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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

all inboxes | Powered by JetHome®