From: "Christian König" <christian.koenig@amd.com>
To: Baoyou Xie <baoyou.xie@linaro.org>, <alexander.deucher@amd.com>,
<airlied@linux.ie>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<arnd@arndb.de>, <xie.baoyou@zte.com.cn>
Subject: Re: [PATCH] drm/radeon/radeon_device: clean function declarations in radeon_device.c up
Date: Wed, 14 Sep 2016 09:22:07 +0200 [thread overview]
Message-ID: <fc0fcf6c-bb40-d567-6c32-44242f14be4f@amd.com> (raw)
In-Reply-To: <1473833457-1729-1-git-send-email-baoyou.xie@linaro.org>
Am 14.09.2016 um 08:10 schrieb Baoyou Xie:
> We get 2 warnings when building kernel with W=1:
> drivers/gpu/drm/radeon/radeon_device.c:1961:5: warning: no previous prototype for 'radeon_debugfs_init' [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_device.c:1966:6: warning: no previous prototype for 'radeon_debugfs_cleanup' [-Wmissing-prototypes]
>
> In fact, both functions are declared in
> drivers/gpu/drm/radeon/radeon_drv.c, but should be declared in
> a header file, thus can be recognized in other file.
>
> So this patch moves the declarations into drivers/gpu/drm/radeon/radeon.h.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Actually if I see it correctly we could also just remove the two
callbacks cause they are optional and our implementations are just empty
dummys.
Christian.
> ---
> drivers/gpu/drm/radeon/radeon_device.c | 1 +
> drivers/gpu/drm/radeon/radeon_drv.c | 5 -----
> drivers/gpu/drm/radeon/radeon_drv.h | 5 +++++
> 3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index a00dd2f..811abde 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -36,6 +36,7 @@
> #include <linux/efi.h>
> #include "radeon_reg.h"
> #include "radeon.h"
> +#include "radeon_drv.h"
> #include "atom.h"
>
> static const char radeon_family_name[][16] = {
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 07e4493..6cc4a9e 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -156,11 +156,6 @@ void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
> extern long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd,
> unsigned long arg);
>
> -#if defined(CONFIG_DEBUG_FS)
> -int radeon_debugfs_init(struct drm_minor *minor);
> -void radeon_debugfs_cleanup(struct drm_minor *minor);
> -#endif
> -
> /* atpx handler */
> #if defined(CONFIG_VGA_SWITCHEROO)
> void radeon_register_atpx_handler(void);
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
> index afef2d9..3d35e0e 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.h
> +++ b/drivers/gpu/drm/radeon/radeon_drv.h
> @@ -119,4 +119,9 @@
> long radeon_drm_ioctl(struct file *filp,
> unsigned int cmd, unsigned long arg);
>
> +#if defined(CONFIG_DEBUG_FS)
> +int radeon_debugfs_init(struct drm_minor *minor);
> +void radeon_debugfs_cleanup(struct drm_minor *minor);
> +#endif
> +
> #endif /* __RADEON_DRV_H__ */
prev parent reply other threads:[~2016-09-14 7:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 6:10 [PATCH] drm/radeon/radeon_device: clean function declarations in radeon_device.c up Baoyou Xie
2016-09-14 7:22 ` Christian König [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=fc0fcf6c-bb40-d567-6c32-44242f14be4f@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=arnd@arndb.de \
--cc=baoyou.xie@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xie.baoyou@zte.com.cn \
/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).