From: Thierry Reding <thierry.reding@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: dri-devel@lists.freedesktop.org, Dave Airlie <airlied@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
Ben Gamari <bgamari@gmail.com>
Subject: Re: [PATCH] drm: always provide debugfs function prototypes
Date: Sat, 22 Jun 2013 12:54:25 +0200 [thread overview]
Message-ID: <20130622105424.GA16861@manwe> (raw)
In-Reply-To: <201306220038.17115.arnd@arndb.de>
[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]
On Sat, Jun 22, 2013 at 12:38:16AM +0200, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
> Cc: Ben Gamari <bgamari@gmail.com>
> Cc: Dave Airlie <airlied@redhat.com>
>
> 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)
> +
I don't know what good the blank line does here, but apart from that
this patch looks good to me:
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-06-22 10:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-21 22:38 [PATCH] drm: always provide debugfs function prototypes Arnd Bergmann
2013-06-22 10:54 ` Thierry Reding [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130622105424.GA16861@manwe \
--to=thierry.reding@gmail.com \
--cc=airlied@redhat.com \
--cc=arnd@arndb.de \
--cc=bgamari@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).