From patchwork Sat Oct 27 20:40:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1656731 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6EF803FD4E for ; Sat, 27 Oct 2012 20:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758222Ab2J0UoA (ORCPT ); Sat, 27 Oct 2012 16:44:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37541 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382Ab2J0Ulz (ORCPT ); Sat, 27 Oct 2012 16:41:55 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9RKfsnb020409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 27 Oct 2012 16:41:55 -0400 Received: from pedra (vpn1-4-98.gru2.redhat.com [10.97.4.98]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9RKfdkh016446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Oct 2012 16:41:54 -0400 Received: from v4l by pedra with local (Exim 4.76) (envelope-from ) id 1TSDCE-0007ak-Si; Sat, 27 Oct 2012 18:41:30 -0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List Subject: [PATCH 24/68] [media] nuvoton-cir: carrier detect support is broken - remove it Date: Sat, 27 Oct 2012 18:40:42 -0200 Message-Id: <1351370486-29040-25-git-send-email-mchehab@redhat.com> In-Reply-To: <1351370486-29040-1-git-send-email-mchehab@redhat.com> References: <1351370486-29040-1-git-send-email-mchehab@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The carrier detect return value is never used on nuvoton driver: drivers/media/rc/nuvoton-cir.c: In function 'nvt_process_rx_ir_data': drivers/media/rc/nuvoton-cir.c:623:6: warning: variable 'carrier' set but not used [-Wunused-but-set-variable] Also, this would be called only if a boolean variable is enabled, but there's no condition that enables it inside the driver. So, comment the carrier detection code, as it might be useful later, and remove the unused glue code. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/nuvoton-cir.c | 7 ++----- drivers/media/rc/nuvoton-cir.h | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index 44ba834..e4ea89a 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -472,6 +472,7 @@ static void nvt_enable_wake(struct nvt_dev *nvt) nvt_cir_wake_reg_write(nvt, 0, CIR_WAKE_IREN); } +#if 0 /* Currently unused */ /* rx carrier detect only works in learning mode, must be called w/nvt_lock */ static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt) { @@ -504,7 +505,7 @@ static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt) return carrier; } - +#endif /* * set carrier frequency * @@ -620,7 +621,6 @@ static void nvt_dump_rx_buf(struct nvt_dev *nvt) static void nvt_process_rx_ir_data(struct nvt_dev *nvt) { DEFINE_IR_RAW_EVENT(rawir); - u32 carrier; u8 sample; int i; @@ -629,9 +629,6 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt) if (debug) nvt_dump_rx_buf(nvt); - if (nvt->carrier_detect_enabled) - carrier = nvt_rx_carrier_detect(nvt); - nvt_dbg_verbose("Processing buffer of len %d", nvt->pkts); init_ir_raw_event(&rawir); diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h index 0d5e087..7c3674f 100644 --- a/drivers/media/rc/nuvoton-cir.h +++ b/drivers/media/rc/nuvoton-cir.h @@ -103,7 +103,6 @@ struct nvt_dev { /* rx settings */ bool learning_enabled; - bool carrier_detect_enabled; /* track cir wake state */ u8 wake_state;