From patchwork Tue Feb 5 13:42:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Bolle X-Patchwork-Id: 16641 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1U2isT-0008TG-Un; Tue, 05 Feb 2013 14:48:01 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp id 1U2is5-0006as-Ir; Tue, 05 Feb 2013 14:47:51 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755410Ab3BENrf (ORCPT + 1 other); Tue, 5 Feb 2013 08:47:35 -0500 Received: from cpsmtpb-ews03.kpnxchange.com ([213.75.39.6]:64407 "EHLO cpsmtpb-ews03.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755267Ab3BENrf (ORCPT ); Tue, 5 Feb 2013 08:47:35 -0500 X-Greylist: delayed 309 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Feb 2013 08:47:35 EST Received: from cpsps-ews29.kpnxchange.com ([10.94.84.195]) by cpsmtpb-ews03.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Tue, 5 Feb 2013 14:41:07 +0100 Received: from CPSMTPM-TLF101.kpnxchange.com ([195.121.3.4]) by cpsps-ews29.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Tue, 5 Feb 2013 14:41:07 +0100 Received: from [192.168.1.101] ([212.123.139.93]) by CPSMTPM-TLF101.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Tue, 5 Feb 2013 14:42:21 +0100 Message-ID: <1360071741.1343.42.camel@x61.thuisdomein> Subject: [PATCH] [media] saa7164: silence GCC warnings From: Paul Bolle To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 05 Feb 2013 14:42:21 +0100 X-Mailer: Evolution 3.4.4 (3.4.4-2.fc17) Mime-Version: 1.0 X-OriginalArrivalTime: 05 Feb 2013 13:42:21.0451 (UTC) FILETIME=[9F6D2DB0:01CE03A6] X-RcptDomain: vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.2.5.133623 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MIME_LOWER_CASE 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1700_1799 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_XOAT 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' Compiling the saa7164 driver without CONFIG_VIDEO_ADV_DEBUG set triggers these GCC warnings: drivers/media/pci/saa7164/saa7164-encoder.c:1301:12: warning: ‘saa7164_g_register’ defined but not used [-Wunused-function] drivers/media/pci/saa7164/saa7164-encoder.c:1314:12: warning: ‘saa7164_s_register’ defined but not used [-Wunused-function] Silence these warnings by wrapping these two functions in an "#ifdef CONFIG_VIDEO_ADV_DEBUG" and "#endif" pair. Signed-off-by: Paul Bolle --- 0) Compile tested only. 1) These warnings are apparently a side effect of commit 5faf7db804e1e67ab8f78edb305d1858779a6279 ("[media] saa7164: get rid of warning: no previous prototype"): now that these two functions are static GCC can determine that they are unused in this case. drivers/media/pci/saa7164/saa7164-encoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c index 994018e..9bb0903 100644 --- a/drivers/media/pci/saa7164/saa7164-encoder.c +++ b/drivers/media/pci/saa7164/saa7164-encoder.c @@ -1298,6 +1298,7 @@ static int saa7164_g_chip_ident(struct file *file, void *fh, return 0; } +#ifdef CONFIG_VIDEO_ADV_DEBUG static int saa7164_g_register(struct file *file, void *fh, struct v4l2_dbg_register *reg) { @@ -1323,6 +1324,7 @@ static int saa7164_s_register(struct file *file, void *fh, return 0; } +#endif static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { .vidioc_s_std = vidioc_s_std,