[PATCH] drm/radeon/radeon_device: clean function declarations in radeon_device.c up

Christian König deathsimple at vodafone.de
Thu Sep 15 07:44:32 UTC 2016


Am 14.09.2016 um 09:35 schrieb Baoyou Xie:
>
>
> On 14 September 2016 at 15:22, Christian König 
> <christian.koenig at amd.com <mailto:christian.koenig at amd.com>> wrote:
>
>     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 at linaro.org
>         <mailto:baoyou.xie at 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.
>
>
> Is it sure? if true, we can simply remove them.

Yeah, they are just empty skeletons as far as I can see.

>
> someone maybe implementation these functions in order to support debugfs.

Well then someone can also add back the skeleton functions as well.

Regards,
Christian.

>     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__ */
>
>
>
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160915/9b6e4e1d/attachment-0001.html>


More information about the dri-devel mailing list