All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: remove unused functions
@ 2016-09-18 14:13 Baoyou Xie
  2016-09-19 10:02 ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: Baoyou Xie @ 2016-09-18 14:13 UTC (permalink / raw)
  To: oded.gabbay, alexander.deucher, christian.koenig, airlied,
	samuel.li, Jammy.Zhou
  Cc: dri-devel, linux-kernel, arnd, baoyou.xie, xie.baoyou

We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:146:5: warning: no previous prototype for 'pool_to_domain' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/cz_smc.c:104:5: warning: no previous prototype for 'cz_send_msg_to_smc_with_parameter_async' [-Wmissing-prototypes]

In fact, both functions are called by no one and not exported,
so this patch removes them.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 --------
 drivers/gpu/drm/amd/amdgpu/cz_smc.c        | 7 -------
 2 files changed, 15 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index d080d08..dba8a5b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -143,14 +143,6 @@ int amdgpu_amdkfd_resume(struct amdgpu_device *rdev)
 	return r;
 }
 
-u32 pool_to_domain(enum kgd_memory_pool p)
-{
-	switch (p) {
-	case KGD_POOL_FRAMEBUFFER: return AMDGPU_GEM_DOMAIN_VRAM;
-	default: return AMDGPU_GEM_DOMAIN_GTT;
-	}
-}
-
 int alloc_gtt_mem(struct kgd_dev *kgd, size_t size,
 			void **mem_obj, uint64_t *gpu_addr,
 			void **cpu_ptr)
diff --git a/drivers/gpu/drm/amd/amdgpu/cz_smc.c b/drivers/gpu/drm/amd/amdgpu/cz_smc.c
index 69ac373c4..db67e0c 100644
--- a/drivers/gpu/drm/amd/amdgpu/cz_smc.c
+++ b/drivers/gpu/drm/amd/amdgpu/cz_smc.c
@@ -101,13 +101,6 @@ int cz_send_msg_to_smc(struct amdgpu_device *adev, u16 msg)
 	return 0;
 }
 
-int cz_send_msg_to_smc_with_parameter_async(struct amdgpu_device *adev,
-						u16 msg, u32 parameter)
-{
-	WREG32(mmSMU_MP1_SRBM2P_ARG_0, parameter);
-	return cz_send_msg_to_smc_async(adev, msg);
-}
-
 int cz_send_msg_to_smc_with_parameter(struct amdgpu_device *adev,
 						u16 msg, u32 parameter)
 {
-- 
2.7.4

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

* Re: [PATCH] drm/amdgpu: remove unused functions
  2016-09-18 14:13 [PATCH] drm/amdgpu: remove unused functions Baoyou Xie
@ 2016-09-19 10:02 ` Christian König
  2016-09-20  4:27   ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2016-09-19 10:02 UTC (permalink / raw)
  To: Baoyou Xie, oded.gabbay, Deucher, Alexander, airlied, Li, Samuel,
	Zhou, Jammy
  Cc: dri-devel, linux-kernel, arnd, xie.baoyou

Am 18.09.2016 um 16:13 schrieb Baoyou Xie:
> We get 2 warnings when building kernel with W=1:
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:146:5: warning: no previous prototype for 'pool_to_domain' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/cz_smc.c:104:5: warning: no previous prototype for 'cz_send_msg_to_smc_with_parameter_async' [-Wmissing-prototypes]
>
> In fact, both functions are called by no one and not exported,
> 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/amd/amdgpu/amdgpu_amdkfd.c | 8 --------
>   drivers/gpu/drm/amd/amdgpu/cz_smc.c        | 7 -------
>   2 files changed, 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> index d080d08..dba8a5b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> @@ -143,14 +143,6 @@ int amdgpu_amdkfd_resume(struct amdgpu_device *rdev)
>   	return r;
>   }
>   
> -u32 pool_to_domain(enum kgd_memory_pool p)
> -{
> -	switch (p) {
> -	case KGD_POOL_FRAMEBUFFER: return AMDGPU_GEM_DOMAIN_VRAM;
> -	default: return AMDGPU_GEM_DOMAIN_GTT;
> -	}
> -}
> -
>   int alloc_gtt_mem(struct kgd_dev *kgd, size_t size,
>   			void **mem_obj, uint64_t *gpu_addr,
>   			void **cpu_ptr)
> diff --git a/drivers/gpu/drm/amd/amdgpu/cz_smc.c b/drivers/gpu/drm/amd/amdgpu/cz_smc.c
> index 69ac373c4..db67e0c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cz_smc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cz_smc.c
> @@ -101,13 +101,6 @@ int cz_send_msg_to_smc(struct amdgpu_device *adev, u16 msg)
>   	return 0;
>   }
>   
> -int cz_send_msg_to_smc_with_parameter_async(struct amdgpu_device *adev,
> -						u16 msg, u32 parameter)
> -{
> -	WREG32(mmSMU_MP1_SRBM2P_ARG_0, parameter);
> -	return cz_send_msg_to_smc_async(adev, msg);
> -}
> -
>   int cz_send_msg_to_smc_with_parameter(struct amdgpu_device *adev,
>   						u16 msg, u32 parameter)
>   {

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

* Re: [PATCH] drm/amdgpu: remove unused functions
  2016-09-19 10:02 ` Christian König
@ 2016-09-20  4:27   ` Alex Deucher
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2016-09-20  4:27 UTC (permalink / raw)
  To: Christian König
  Cc: Baoyou Xie, oded.gabbay, Deucher, Alexander, airlied, Li, Samuel,
	Zhou, Jammy, xie.baoyou, arnd, linux-kernel, dri-devel

On Mon, Sep 19, 2016 at 6:02 AM, Christian König
<christian.koenig@amd.com> wrote:
> Am 18.09.2016 um 16:13 schrieb Baoyou Xie:
>>
>> We get 2 warnings when building kernel with W=1:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:146:5: warning: no previous
>> prototype for 'pool_to_domain' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/cz_smc.c:104:5: warning: no previous prototype
>> for 'cz_send_msg_to_smc_with_parameter_async' [-Wmissing-prototypes]
>>
>> In fact, both functions are called by no one and not exported,
>> 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/amd/amdgpu/amdgpu_amdkfd.c | 8 --------
>>   drivers/gpu/drm/amd/amdgpu/cz_smc.c        | 7 -------
>>   2 files changed, 15 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
>> index d080d08..dba8a5b 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
>> @@ -143,14 +143,6 @@ int amdgpu_amdkfd_resume(struct amdgpu_device *rdev)
>>         return r;
>>   }
>>   -u32 pool_to_domain(enum kgd_memory_pool p)
>> -{
>> -       switch (p) {
>> -       case KGD_POOL_FRAMEBUFFER: return AMDGPU_GEM_DOMAIN_VRAM;
>> -       default: return AMDGPU_GEM_DOMAIN_GTT;
>> -       }
>> -}
>> -
>>   int alloc_gtt_mem(struct kgd_dev *kgd, size_t size,
>>                         void **mem_obj, uint64_t *gpu_addr,
>>                         void **cpu_ptr)
>> diff --git a/drivers/gpu/drm/amd/amdgpu/cz_smc.c
>> b/drivers/gpu/drm/amd/amdgpu/cz_smc.c
>> index 69ac373c4..db67e0c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/cz_smc.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/cz_smc.c
>> @@ -101,13 +101,6 @@ int cz_send_msg_to_smc(struct amdgpu_device *adev,
>> u16 msg)
>>         return 0;
>>   }
>>   -int cz_send_msg_to_smc_with_parameter_async(struct amdgpu_device *adev,
>> -                                               u16 msg, u32 parameter)
>> -{
>> -       WREG32(mmSMU_MP1_SRBM2P_ARG_0, parameter);
>> -       return cz_send_msg_to_smc_async(adev, msg);
>> -}
>> -
>>   int cz_send_msg_to_smc_with_parameter(struct amdgpu_device *adev,
>>                                                 u16 msg, u32 parameter)
>>   {
>
>
>
> _______________________________________________
> 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-20  4:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-18 14:13 [PATCH] drm/amdgpu: remove unused functions Baoyou Xie
2016-09-19 10:02 ` Christian König
2016-09-20  4:27   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.