Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1484183 > unrolled thread

[PATCH] drm/amdgpu: clean function declarations in amdgpu_ttm.c up

Started byBaoyou Xie <baoyou.xie@linaro.org>
First post2016-09-15 15:50 +0200
Last post2016-09-16 21:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/amdgpu: clean function declarations in amdgpu_ttm.c up Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-15 15:50 +0200
    Re: [PATCH] drm/amdgpu: clean function declarations in amdgpu_ttm.c up Alex Deucher <alexdeucher@gmail.com> - 2016-09-16 21:40 +0200

#1484183 — [PATCH] drm/amdgpu: clean function declarations in amdgpu_ttm.c up

FromBaoyou Xie <baoyou.xie@linaro.org>
Date2016-09-15 15:50 +0200
Subject[PATCH] drm/amdgpu: clean function declarations in amdgpu_ttm.c up
Message-ID<shFd7-7FN-9@gated-at.bofh.it>
We get 2 warnings when building kernel with W=1:

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:985:5: warning: no previous prototype for 'amdgpu_ttm_init' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1092:6: warning: no previous prototype for 'amdgpu_ttm_fini' [-Wmissing-prototypes]

In fact, both functions are declared in
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.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/amd/amdgpu/amdgpu.h.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 2 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index a7bb862..3208608 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -2402,6 +2402,8 @@ void amdgpu_gtt_location(struct amdgpu_device *adev, struct amdgpu_mc *mc);
 void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, u64 size);
 u64 amdgpu_ttm_get_gtt_mem_size(struct amdgpu_device *adev);
 int amdgpu_ttm_global_init(struct amdgpu_device *adev);
+int amdgpu_ttm_init(struct amdgpu_device *adev);
+void amdgpu_ttm_fini(struct amdgpu_device *adev);
 void amdgpu_program_register_sequence(struct amdgpu_device *adev,
 					     const u32 *registers,
 					     const u32 array_size);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index b17734e..30f05d8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -38,8 +38,6 @@
 #include "amdgpu_trace.h"
 
 
-int amdgpu_ttm_init(struct amdgpu_device *adev);
-void amdgpu_ttm_fini(struct amdgpu_device *adev);
 
 static u64 amdgpu_get_vis_part_size(struct amdgpu_device *adev,
 						struct ttm_mem_reg *mem)
-- 
2.7.4

[toc] | [next] | [standalone]


#1485274

FromAlex Deucher <alexdeucher@gmail.com>
Date2016-09-16 21:40 +0200
Message-ID<si79o-BS-23@gated-at.bofh.it>
In reply to#1484183
On Thu, Sep 15, 2016 at 9:49 AM, Christian König
<christian.koenig@amd.com> wrote:
> Am 15.09.2016 um 15:43 schrieb Baoyou Xie:
>>
>> We get 2 warnings when building kernel with W=1:
>>
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:985:5: warning: no previous
>> prototype for 'amdgpu_ttm_init' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1092:6: warning: no previous
>> prototype for 'amdgpu_ttm_fini' [-Wmissing-prototypes]
>>
>> In fact, both functions are declared in
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.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/amd/amdgpu/amdgpu.h.
>>
>> 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.h        | 2 ++
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 --
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> index a7bb862..3208608 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> @@ -2402,6 +2402,8 @@ void amdgpu_gtt_location(struct amdgpu_device *adev,
>> struct amdgpu_mc *mc);
>>   void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, u64
>> size);
>>   u64 amdgpu_ttm_get_gtt_mem_size(struct amdgpu_device *adev);
>>   int amdgpu_ttm_global_init(struct amdgpu_device *adev);
>> +int amdgpu_ttm_init(struct amdgpu_device *adev);
>> +void amdgpu_ttm_fini(struct amdgpu_device *adev);
>>   void amdgpu_program_register_sequence(struct amdgpu_device *adev,
>>                                              const u32 *registers,
>>                                              const u32 array_size);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> index b17734e..30f05d8 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> @@ -38,8 +38,6 @@
>>   #include "amdgpu_trace.h"
>>     -int amdgpu_ttm_init(struct amdgpu_device *adev);
>> -void amdgpu_ttm_fini(struct amdgpu_device *adev);
>>     static u64 amdgpu_get_vis_part_size(struct amdgpu_device *adev,
>>                                                 struct ttm_mem_reg *mem)
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web