public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@linuxtv.org>
To: Steve Kerrison <steve@stevekerrison.com>
Cc: Antti Palosaari <crope@iki.fi>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v2 3/5] mxl5005: Fix warning caused by new entries in an enum
Date: Mon, 09 May 2011 00:11:42 +0200	[thread overview]
Message-ID: <4DC7151E.1060606@linuxtv.org> (raw)
In-Reply-To: <1304882240-23044-4-git-send-email-steve@stevekerrison.com>

On 05/08/2011 09:17 PM, Steve Kerrison wrote:
> Additional bandwidth modes have been added in frontend.h
> mxl5005s.c had no default case so the compiler was warning about
> a non-exhausive switch statement.
> 
> Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
> ---
>  drivers/media/common/tuners/mxl5005s.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
> index 0d6e094..d80e6f3 100644
> --- a/drivers/media/common/tuners/mxl5005s.c
> +++ b/drivers/media/common/tuners/mxl5005s.c
> @@ -4020,6 +4020,10 @@ static int mxl5005s_set_params(struct dvb_frontend *fe,
>  			case BANDWIDTH_7_MHZ:
>  				req_bw  = MXL5005S_BANDWIDTH_7MHZ;
>  				break;
> +			default:
> +				dprintk(1,"%s: Unsupported bandwidth mode %u, reverting to default\n",
> +					__func__,params->u.ofdm.bandwidth);
> +				/* Fall back to auto */
>  			case BANDWIDTH_AUTO:
>  			case BANDWIDTH_8_MHZ:
>  				req_bw  = MXL5005S_BANDWIDTH_8MHZ;

Same as in 2/5.

>From 9492d6c7665bf8b55ec3a42577794cea3e87ee15 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@linuxtv.org>
Date: Fri, 8 Apr 2011 16:37:57 +0000
Subject: [PATCH 1/2] DVB: mxl5005s: handle new bandwidths by returning -EINVAL

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
---
 drivers/media/common/tuners/mxl5005s.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
index 605e28b..5618b35 100644
--- a/drivers/media/common/tuners/mxl5005s.c
+++ b/drivers/media/common/tuners/mxl5005s.c
@@ -4024,6 +4024,8 @@ static int mxl5005s_set_params(struct dvb_frontend *fe,
 			case BANDWIDTH_8_MHZ:
 				req_bw  = MXL5005S_BANDWIDTH_8MHZ;
 				break;
+			default:
+				return -EINVAL;
 			}
 		}
 
-- 
1.7.2.5


  reply	other threads:[~2011-05-08 22:11 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110506125542.ADA1D162E7@stevekerrison.com>
2011-05-06 13:46 ` [git:v4l-dvb/for_v2.6.40] [media] Sony CXD2820R DVB-T/T2/C demodulator driver Antti Palosaari
2011-05-06 15:30 ` Mauro Carvalho Chehab
2011-05-06 15:46   ` Mauro Carvalho Chehab
2011-05-08 15:51     ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Steve Kerrison
2011-05-08 16:04       ` Mauro Carvalho Chehab
2011-05-08 19:17         ` [PATCH v2 0/5] " Steve Kerrison
2011-05-08 19:17         ` [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
2011-05-08 22:22           ` Andreas Oberritter
2011-05-08 22:38             ` Andreas Oberritter
2011-05-12 21:11               ` [PATCH v3] " Steve Kerrison
2011-05-08 19:17         ` [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum Steve Kerrison
2011-05-08 22:10           ` Andreas Oberritter
2011-05-09  9:15             ` Steve Kerrison
2011-05-09  9:25               ` Mauro Carvalho Chehab
2011-05-08 19:17         ` [PATCH v2 3/5] mxl5005: " Steve Kerrison
2011-05-08 22:11           ` Andreas Oberritter [this message]
2011-05-08 19:17         ` [PATCH v2 4/5] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
2011-05-09 21:45           ` Antti Palosaari
2011-05-08 19:17         ` [PATCH v2 5/5] Documentation: Update to include DVB-T2 additions Steve Kerrison
2011-05-12 21:18           ` Steve Kerrison
     [not found]         ` <1304875061.2920.13.camel@ares>
2011-05-08 22:26           ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Andreas Oberritter
2011-05-09  3:10             ` Mauro Carvalho Chehab
2011-05-12 22:06       ` Antti Palosaari
2011-05-08 15:51     ` [PATCH 1/6] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
2011-05-08 15:51     ` [PATCH 2/6] cxd2820r: Remove temporary T2 API hack Steve Kerrison
2011-05-08 16:06       ` Mauro Carvalho Chehab
2011-05-08 15:51     ` [PATCH 3/6] drxd: Fix warning caused by new entries in an enum Steve Kerrison
2011-05-08 15:51     ` [PATCH 4/6] mxl5005: " Steve Kerrison
2011-05-08 15:51     ` [PATCH 5/6] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
2011-05-08 15:51     ` [PATCH 6/6] Documentation: Update to include DVB-T2 additions Steve Kerrison
2011-05-08 16:20       ` Mauro Carvalho Chehab
2011-05-08 19:13         ` Steve Kerrison
2011-05-08 22:05           ` Andreas Oberritter

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=4DC7151E.1060606@linuxtv.org \
    --to=obi@linuxtv.org \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=steve@stevekerrison.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