public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrey Utkin <andrey_utkin@fastmail.com>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Bluecherry Maintainers <maintainers@bluecherrydvr.com>,
	Andrey Utkin <andrey.utkin@corp.bluecherry.net>,
	Michael Buesch <m@bues.ch>,
	anton@corp.bluecherry.net
Subject: Re: [PATCH 1/4] [media] tw5864, fc0011: better handle WARN_ON()
Date: Thu, 18 May 2017 19:48:28 +0100	[thread overview]
Message-ID: <20170518184828.GA6449@dell-m4800> (raw)
In-Reply-To: <754069659fbb44b458d8a8bef67d8f3f235d0c87.1495116400.git.mchehab@s-opensource.com>

On Thu, May 18, 2017 at 11:06:43AM -0300, Mauro Carvalho Chehab wrote:
> As such macro will check if the expression is true, it may fall through, as
> warned:

> On both cases, it means an error, so, let's return an error
> code, to make gcc happy.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
>  drivers/media/pci/tw5864/tw5864-video.c | 1 +
>  drivers/media/tuners/fc0011.c           | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c
> index 2a044be729da..e7bd2b8484e3 100644
> --- a/drivers/media/pci/tw5864/tw5864-video.c
> +++ b/drivers/media/pci/tw5864/tw5864-video.c
> @@ -545,6 +545,7 @@ static int tw5864_fmt_vid_cap(struct file *file, void *priv,
>  	switch (input->std) {
>  	default:
>  		WARN_ON_ONCE(1);
> +		return -EINVAL;
>  	case STD_NTSC:
>  		f->fmt.pix.height = 480;
>  		break;

Hi Mauro,

Thanks for the patch.

I actually meant it to fall through, but I agree this is not how it
should be.
I'm fine with this patch. Unfortunately I don't possess tw5864 hardware
now. CCing Anton Sviridenko whom I've handed it (I guess he's on
Bluecherry Maintainers groupmail as well).

Anton, just in case, could you please ensure the driver with this patch
works well in runtime?

  parent reply	other threads:[~2017-05-18 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 14:06 [PATCH 1/4] [media] tw5864, fc0011: better handle WARN_ON() Mauro Carvalho Chehab
2017-05-18 14:06 ` [PATCH 2/4] [media] imon: better code the pad_mouse toggling Mauro Carvalho Chehab
2017-05-18 14:23   ` Sean Young
2017-05-18 14:06 ` [PATCH 3/4] [media] s5p-jpeg: don't return a random width/height Mauro Carvalho Chehab
2017-05-19  7:22   ` Andrzej Pietrasiewicz
2017-05-18 14:06 ` [PATCH 4/4] [media] mtk_vcodec_dec: return error at mtk_vdec_pic_info_update() Mauro Carvalho Chehab
2017-05-18 18:48 ` Andrey Utkin [this message]
2017-05-19 16:55   ` [PATCH 1/4] [media] tw5864, fc0011: better handle WARN_ON() Anton Sviridenko
2017-05-18 20:55 ` Michael Büsch

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=20170518184828.GA6449@dell-m4800 \
    --to=andrey_utkin@fastmail.com \
    --cc=andrey.utkin@corp.bluecherry.net \
    --cc=anton@corp.bluecherry.net \
    --cc=linux-media@vger.kernel.org \
    --cc=m@bues.ch \
    --cc=maintainers@bluecherrydvr.com \
    --cc=mchehab@infradead.org \
    --cc=mchehab@s-opensource.com \
    /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