mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/radeon/radeon_device: remove unused function
@ 2016-09-15 14:13 Baoyou Xie
  2016-09-15 17:44 ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: Baoyou Xie @ 2016-09-15 14:13 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied
  Cc: dri-devel, linux-kernel, arnd, baoyou.xie, xie.baoyou

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, these functions are dummy, but can be removed,
so this patch removes them.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_device.c | 11 -----------
 drivers/gpu/drm/radeon/radeon_drv.c    |  9 ---------
 2 files changed, 20 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index a00dd2f..63447f1 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1956,14 +1956,3 @@ static void radeon_debugfs_remove_files(struct radeon_device *rdev)
 	}
 #endif
 }
-
-#if defined(CONFIG_DEBUG_FS)
-int radeon_debugfs_init(struct drm_minor *minor)
-{
-	return 0;
-}
-
-void radeon_debugfs_cleanup(struct drm_minor *minor)
-{
-}
-#endif
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 07e4493..86bab2e 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);
@@ -531,10 +526,6 @@ static struct drm_driver kms_driver = {
 	.disable_vblank = radeon_disable_vblank_kms,
 	.get_vblank_timestamp = radeon_get_vblank_timestamp_kms,
 	.get_scanout_position = radeon_get_crtc_scanoutpos,
-#if defined(CONFIG_DEBUG_FS)
-	.debugfs_init = radeon_debugfs_init,
-	.debugfs_cleanup = radeon_debugfs_cleanup,
-#endif
 	.irq_preinstall = radeon_driver_irq_preinstall_kms,
 	.irq_postinstall = radeon_driver_irq_postinstall_kms,
 	.irq_uninstall = radeon_driver_irq_uninstall_kms,
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/radeon/radeon_device: remove unused function
  2016-09-15 14:13 [PATCH] drm/radeon/radeon_device: remove unused function Baoyou Xie
@ 2016-09-15 17:44 ` Christian König
  2016-09-16 19:33   ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2016-09-15 17:44 UTC (permalink / raw)
  To: Baoyou Xie, Deucher, Alexander, airlied
  Cc: dri-devel, linux-kernel, arnd, xie.baoyou

Am 15.09.2016 um 16:13 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, these functions are dummy, but can be removed,
> so this patch removes them.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>

Reviewed-by: Christian König <christian.koenig@amd.com>.

> ---
>   drivers/gpu/drm/radeon/radeon_device.c | 11 -----------
>   drivers/gpu/drm/radeon/radeon_drv.c    |  9 ---------
>   2 files changed, 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index a00dd2f..63447f1 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -1956,14 +1956,3 @@ static void radeon_debugfs_remove_files(struct radeon_device *rdev)
>   	}
>   #endif
>   }
> -
> -#if defined(CONFIG_DEBUG_FS)
> -int radeon_debugfs_init(struct drm_minor *minor)
> -{
> -	return 0;
> -}
> -
> -void radeon_debugfs_cleanup(struct drm_minor *minor)
> -{
> -}
> -#endif
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 07e4493..86bab2e 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);
> @@ -531,10 +526,6 @@ static struct drm_driver kms_driver = {
>   	.disable_vblank = radeon_disable_vblank_kms,
>   	.get_vblank_timestamp = radeon_get_vblank_timestamp_kms,
>   	.get_scanout_position = radeon_get_crtc_scanoutpos,
> -#if defined(CONFIG_DEBUG_FS)
> -	.debugfs_init = radeon_debugfs_init,
> -	.debugfs_cleanup = radeon_debugfs_cleanup,
> -#endif
>   	.irq_preinstall = radeon_driver_irq_preinstall_kms,
>   	.irq_postinstall = radeon_driver_irq_postinstall_kms,
>   	.irq_uninstall = radeon_driver_irq_uninstall_kms,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/radeon/radeon_device: remove unused function
  2016-09-15 17:44 ` Christian König
@ 2016-09-16 19:33   ` Alex Deucher
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2016-09-16 19:33 UTC (permalink / raw)
  To: Christian König
  Cc: Baoyou Xie, Deucher, Alexander, airlied, xie.baoyou, arnd,
	linux-kernel, dri-devel

On Thu, Sep 15, 2016 at 1:44 PM, Christian König
<christian.koenig@amd.com> wrote:
> Am 15.09.2016 um 16:13 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, these functions are dummy, but can be removed,
>> so this patch removes them.
>>
>> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>.
>

Applied.  thanks!

Alex

>
>> ---
>>   drivers/gpu/drm/radeon/radeon_device.c | 11 -----------
>>   drivers/gpu/drm/radeon/radeon_drv.c    |  9 ---------
>>   2 files changed, 20 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_device.c
>> b/drivers/gpu/drm/radeon/radeon_device.c
>> index a00dd2f..63447f1 100644
>> --- a/drivers/gpu/drm/radeon/radeon_device.c
>> +++ b/drivers/gpu/drm/radeon/radeon_device.c
>> @@ -1956,14 +1956,3 @@ static void radeon_debugfs_remove_files(struct
>> radeon_device *rdev)
>>         }
>>   #endif
>>   }
>> -
>> -#if defined(CONFIG_DEBUG_FS)
>> -int radeon_debugfs_init(struct drm_minor *minor)
>> -{
>> -       return 0;
>> -}
>> -
>> -void radeon_debugfs_cleanup(struct drm_minor *minor)
>> -{
>> -}
>> -#endif
>> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c
>> b/drivers/gpu/drm/radeon/radeon_drv.c
>> index 07e4493..86bab2e 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);
>> @@ -531,10 +526,6 @@ static struct drm_driver kms_driver = {
>>         .disable_vblank = radeon_disable_vblank_kms,
>>         .get_vblank_timestamp = radeon_get_vblank_timestamp_kms,
>>         .get_scanout_position = radeon_get_crtc_scanoutpos,
>> -#if defined(CONFIG_DEBUG_FS)
>> -       .debugfs_init = radeon_debugfs_init,
>> -       .debugfs_cleanup = radeon_debugfs_cleanup,
>> -#endif
>>         .irq_preinstall = radeon_driver_irq_preinstall_kms,
>>         .irq_postinstall = radeon_driver_irq_postinstall_kms,
>>         .irq_uninstall = radeon_driver_irq_uninstall_kms,
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-16 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 14:13 [PATCH] drm/radeon/radeon_device: remove unused function Baoyou Xie
2016-09-15 17:44 ` Christian König
2016-09-16 19:33   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®