From patchwork Fri May 31 22:22:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2646171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 95D1BDFB79 for ; Fri, 31 May 2013 23:07:56 +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 1UiXmr-0007Wz-BX; Fri, 31 May 2013 22:27:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiXlA-0004Q5-K8; Fri, 31 May 2013 22:25:20 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiXjR-0004AX-Qq for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2013 22:23:38 +0000 Received: from wuerfel.lan (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MZK36-1Uz7hj225U-00KzRG; Sat, 01 Jun 2013 00:23:03 +0200 From: Arnd Bergmann To: linux-kernel@vger.kernel.org Subject: [PATCH 09/15] drm: always provide debugfs function prototypes Date: Sat, 1 Jun 2013 00:22:46 +0200 Message-Id: <1370038972-2318779-10-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1370038972-2318779-1-git-send-email-arnd@arndb.de> References: <1370038972-2318779-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:OqXP3GBBXb/1eUm1dkeW5iMhWKJ4NpGdAvCnuvNQ4cp nTfUcQZnmpq2r6IEZ1h/UWhK9tt6+hyEhyLInmK7Q1PgDrmDmo 0OTIDAWDulDn3DPNhd0PN69oSYuJ9crAJO42sX79nMPdsnPDDM eGum7ypV0p3KCnw7f3Njr/wViZcFgHGSpxpmGtaVU1V0Kvl78N 4o8dppv7QegYUE+4xi/MhwK+TgKhlwDsrti4sRhqViXe1xoVw9 mn/4fiy5A3s7uIhCCkHEMwyj3w+wVwxtqhUggBCiYi1OCboMa8 Q5IYQGehZvvt6C5kO04tEmLJU5+GmqWWJHNHxBaKzJwGPiQ0SG fbhEwvTmMmUvHrl5KAbIvS9kHVGhEkCKxIMKi/aOn X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130531_182334_189713_689B4C0B X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.171 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Ben Gamari , patches@lists.linaro.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Dave Airlie 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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] Cc: Ben Gamari Cc: Dave Airlie Signed-off-by: Arnd Bergmann --- include/drm/drmP.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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);