From patchwork Sun May 8 19:17:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Kerrison X-Patchwork-Id: 766452 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p48JHg1P029552 for ; Sun, 8 May 2011 19:17:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754784Ab1EHTRk (ORCPT ); Sun, 8 May 2011 15:17:40 -0400 Received: from stevekez.vm.bytemark.co.uk ([80.68.91.30]:55401 "EHLO stevekerrison.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754397Ab1EHTRj (ORCPT ); Sun, 8 May 2011 15:17:39 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by stevekerrison.com (Postfix) with ESMTP id 031B8163D0; Sun, 8 May 2011 20:17:39 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at stevekerrison.com Received: from stevekerrison.com ([127.0.0.1]) by localhost (stevekez.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VJl-vX7-MXS0; Sun, 8 May 2011 20:17:35 +0100 (BST) Received: from localhost.localdomain (94-193-106-123.zone7.bethere.co.uk [94.193.106.123]) (Authenticated sender: steve@stevekerrison.com) by stevekerrison.com (Postfix) with ESMTPSA id 3E6BE163D1; Sun, 8 May 2011 20:17:33 +0100 (BST) From: Steve Kerrison To: Antti Palosaari , Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: Andreas Oberritter , Steve Kerrison Subject: [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum Date: Sun, 8 May 2011 20:17:17 +0100 Message-Id: <1304882240-23044-3-git-send-email-steve@stevekerrison.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <4DC6BF28.8070006@redhat.com> References: <4DC6BF28.8070006@redhat.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 (demeter2.kernel.org [140.211.167.43]); Sun, 08 May 2011 19:17:42 +0000 (UTC) Additional bandwidth modes have been added in frontend.h drxd_hard.c had no default case so the compiler was warning about a non-exhausive switch statement. This has been fixed by making the default behaviour the same as BANDWIDTH_AUTO, with the addition of a printk to notify if this ever happens. Signed-off-by: Steve Kerrison --- drivers/media/dvb/frontends/drxd_hard.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c index 30a78af..b3b0704 100644 --- a/drivers/media/dvb/frontends/drxd_hard.c +++ b/drivers/media/dvb/frontends/drxd_hard.c @@ -2325,6 +2325,10 @@ static int DRX_Start(struct drxd_state *state, s32 off) InitEC and ResetEC functions */ switch (p->bandwidth) { + default: + printk(KERN_INFO "drxd: Unsupported bandwidth mode %u, reverting to default\n", + p->bandwidth); + /* Fall back to auto */ case BANDWIDTH_AUTO: case BANDWIDTH_8_MHZ: /* (64/7)*(8/8)*1000000 */