From patchwork Fri Jun 21 22:38:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2764761 Return-Path: X-Original-To: patchwork-dri-devel@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 9CAB19F472 for ; Fri, 21 Jun 2013 22:38:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B26E6201B6 for ; Fri, 21 Jun 2013 22:38:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7F00A201B4 for ; Fri, 21 Jun 2013 22:38:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E4ACE6684 for ; Fri, 21 Jun 2013 15:38:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by gabe.freedesktop.org (Postfix) with ESMTP id C53E5E5C21 for ; Fri, 21 Jun 2013 15:38:25 -0700 (PDT) Received: from klappe2.localnet (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LyS7K-1UBovO0lgE-015HKy; Sat, 22 Jun 2013 00:38:24 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: always provide debugfs function prototypes Date: Sat, 22 Jun 2013 00:38:16 +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: <201306220038.17115.arnd@arndb.de> X-Provags-ID: V02:K0:XOC8x7fUtgRU7S4wsEJRKcKIT3ewDBaWdVGaIX1BXAg RIqJmZ/eBE84DsAdiLFjH+H7xgRvXn7Kbb+7+ppwQt25VRQeUl AvNgiXaNYLgaMnlEi8DUVyHWzf2vnV5yrDJJMZMfAuYZZfnfUp MRQ0zeQ822Bj0W86o/O5sWjtpl3m1C4auQnr6ZlxHgkU3eBn3l FD6Wt9ZIvOLzoMCkY2ro6eXtU7lUWRofkqaI5EFqfjpYbfKaZ6 pTE3SZJl7FD23h7UYhtnuMF7h9uB/IenhA5OlaBe2TQ/prNcon iZCc6ugqoA2/PyKYvTrcw6dttxTdx6sPm+wV7+uiRokshv26+g 45hSUlh56W16sGc/IuNU= Cc: Dave Airlie , Linux Kernel Mailing List , Linux ARM Kernel List , Ben Gamari X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.7 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 Cc: Ben Gamari Cc: Dave Airlie Reviewed-by: Thierry Reding 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);