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


Groups > linux.kernel > #1447043 > unrolled thread

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

Started byHans Verkuil <hverkuil@xs4all.nl>
First post2016-07-20 09:40 +0200
Last post2016-07-20 09:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#1447043 — Re: [PATCH v6] [media] pci: Add tw5864 driver

FromHans Verkuil <hverkuil@xs4all.nl>
Date2016-07-20 09:40 +0200
SubjectRe: [PATCH v6] [media] pci: Add tw5864 driver
Message-ID<rWUgO-6SN-23@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web