From patchwork Fri Jul 5 15:41:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2824279 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 25C539F7D6 for ; Fri, 5 Jul 2013 15:46:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45F3320172 for ; Fri, 5 Jul 2013 15:46:15 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 385B5200F3 for ; Fri, 5 Jul 2013 15:46:14 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uv8A8-0007Sg-L7; Fri, 05 Jul 2013 15:43:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uv89I-00010R-RS; Fri, 05 Jul 2013 15:42:16 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uv89F-0000zf-Up for linux-arm-kernel@lists.infradead.org; Fri, 05 Jul 2013 15:42:14 +0000 Received: from klappe2.localnet (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0M9eBT-1V4iVq1ZF9-00Cm5h; Fri, 05 Jul 2013 17:41:45 +0200 From: Arnd Bergmann To: Dave Airlie Subject: [PATCH, re-send] drm: always provide debugfs function prototypes Date: Fri, 5 Jul 2013 17:41:38 +0200 User-Agent: KMail/1.12.2 (Linux/3.8.0-22-generic; KDE/4.3.2; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201307051741.38496.arnd@arndb.de> X-Provags-ID: V02:K0:Td43HHcbsOENrP1Ujznqg2nLzSkf58cYDdEcia42chI L1ue6tN03PQVEyGcKNc33+57axcxD5SDr4AkqX0mj+55Jmcvfx BkI+jkzg6sSiySO8WIuOoATxmv63tCKnSEEoapc7WrSViWx0IZ l6xuEBv88D139dZrb6bnfzi7kCqCg0NJ5ZJu7//nYkq3tZpIMv 1wWE2pnMP5sNzypKDxBXOqF2RWzVmspM9JfS1ny0Eh3TFlkmJ3 4ZyZDGNWmsrZQWxQ9OdOSJ5N4npiq1zmhtp8Py95/0AuoX+HPd juPNk4g4KD3pR8VMZbjiIQeDequVCOVUyhDDCXYMo+P82zUMGI MoEjR+xDgxC3t27M4ME4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130705_114214_291784_F0740A7D X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: dri-devel@lists.freedesktop.org, Thierry Reding , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is generally considered bad style to enclose function prototypes in header files in #ifdef. This case illustrates why that is: The tegra host1x driver calls into the debugfs functions if CONFIG_DEBUG_FS is enabled, but that code is otherwise already discarded by the compiler, so leaving the prototype in place actually makes everything work. drivers/gpu/host1x/drm/dc.c: In function 'tegra_dc_debugfs_init': drivers/gpu/host1x/drm/dc.c:1004:2: error: implicit declaration of function 'drm_debugfs_create_files' [-Werror=implicit-function-declaration] drivers/gpu/host1x/drm/dc.c: In function 'tegra_dc_debugfs_exit': drivers/gpu/host1x/drm/dc.c:1026:2: error: implicit declaration of function 'drm_debugfs_remove_files' [-Werror=implicit-function-declaration] Signed-off-by: Arnd Bergmann Reviewed-by: Thierry Reding Cc: Ben Gamari Cc: Dave Airlie diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 63d17ee..8bc105e 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1551,7 +1551,7 @@ extern int drm_proc_init(struct drm_minor *minor, struct proc_dir_entry *root); extern int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root); /* Debugfs support */ -#if defined(CONFIG_DEBUG_FS) + extern int drm_debugfs_init(struct drm_minor *minor, int minor_id, struct dentry *root); extern int drm_debugfs_create_files(struct drm_info_list *files, int count, @@ -1559,7 +1559,6 @@ extern int drm_debugfs_create_files(struct drm_info_list *files, int count, extern int drm_debugfs_remove_files(struct drm_info_list *files, int count, struct drm_minor *minor); extern int drm_debugfs_cleanup(struct drm_minor *minor); -#endif /* Info file support */ extern int drm_name_info(struct seq_file *m, void *data); diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 88591ef..4a7759a 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h @@ -37,9 +37,7 @@ * Generic range manager structs */ #include -#ifdef CONFIG_DEBUG_FS #include -#endif struct drm_mm_node { struct list_head node_list;