Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1447043

Re: [PATCH v6] [media] pci: Add tw5864 driver

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Hans Verkuil <hverkuil@xs4all.nl>
Newsgroups linux.kernel
Subject Re: [PATCH v6] [media] pci: Add tw5864 driver
Date Wed, 20 Jul 2016 09:40:02 +0200
Message-ID <rWUgO-6SN-23@gated-at.bofh.it> (permalink)
References <rWOO6-3gp-7@gated-at.bofh.it>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 50
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-pci@vger.kernel.org, kernel-mentors@selenic.com, Andrey Utkin <andrey_utkin@fastmail.com>
X-Original-Date Wed, 20 Jul 2016 09:30:23 +0200
X-Original-Message-ID <6be09f83-7fd0-2c1b-8e8e-fa19f6d52751@xs4all.nl>
X-Original-References <20160720014205.15521-1-andrey.utkin@corp.bluecherry.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1447043

Show key headers only | View raw


On 07/20/2016 03:42 AM, Andrey Utkin wrote:
> Changes since v5:
>  - Rework known issues notice as suggested by Hans Verkuil (and previously Joe Perches)
> 
> I am leaving for a vacation in a day and won't respond before 3rd of August.
> I wish to all of you to enjoy your time, too.
> 
> Thanks to all the reviewers for their efforts.
> 

<snip>

> +static int tw5864_input_std_get(struct tw5864_input *input,
> +				enum tw5864_vid_std *std_arg)
> +{
> +	struct tw5864_dev *dev = input->root;
> +	enum tw5864_vid_std std;
> +	u8 std_reg = tw_indir_readb(TW5864_INDIR_VIN_E(input->nr));
> +
> +	std = (std_reg & 0x70) >> 4;
> +
> +	if (std_reg & 0x80) {
> +		dev_err(&dev->pci->dev,
> +			"Video format detection is in progress, please wait\n");

Use dev_dbg instead of dev_err.

> +		return -EAGAIN;
> +	}
> +
> +	if (std == STD_INVALID) {
> +		dev_err(&dev->pci->dev, "No valid video format detected\n");
> +		return -EPERM;

This is still wrong. From my v5 review:

"In this case set *std_arg to V4L2_STD_UNKNOWN and just return 0. As per the QUERYSTD spec."

Also, don't use dev_err here. There is nothing wrong with not being able to detect
a valid format. I'd just drop the message.

> +	}
> +
> +	*std_arg = std;
> +	return 0;
> +}

Regards,

	Hans

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v6] [media] pci: Add tw5864 driver Hans Verkuil <hverkuil@xs4all.nl> - 2016-07-20 09:40 +0200

csiph-web