From patchwork Sun May 8 22:11:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Oberritter X-Patchwork-Id: 766802 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p48MBlYk017772 for ; Sun, 8 May 2011 22:11:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754796Ab1EHWLp (ORCPT ); Sun, 8 May 2011 18:11:45 -0400 Received: from ffm.saftware.de ([83.141.3.46]:51403 "EHLO ffm.saftware.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754431Ab1EHWLo (ORCPT ); Sun, 8 May 2011 18:11:44 -0400 Received: from localhost (localhost [127.0.0.1]) by ffm.saftware.de (Postfix) with ESMTP id 2F5D82C0A31; Mon, 9 May 2011 00:11:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ffm.saftware.de Received: from ffm.saftware.de ([127.0.0.1]) by localhost (ffm.saftware.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id pJ4JoACDLo2Z; Mon, 9 May 2011 00:11:43 +0200 (CEST) Message-ID: <4DC7151E.1060606@linuxtv.org> Date: Mon, 09 May 2011 00:11:42 +0200 From: Andreas Oberritter User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Steve Kerrison CC: Antti Palosaari , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: Re: [PATCH v2 3/5] mxl5005: Fix warning caused by new entries in an enum References: <4DC6BF28.8070006@redhat.com> <1304882240-23044-4-git-send-email-steve@stevekerrison.com> In-Reply-To: <1304882240-23044-4-git-send-email-steve@stevekerrison.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 08 May 2011 22:11:47 +0000 (UTC) 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 > --- > 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 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 --- 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; } }