diff mbox

[drm-next] drm/amdgpu: make function uvd_v6_0_enc_get_destroy_msg static

Message ID 20171011092111.16842-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Colin King Oct. 11, 2017, 9:21 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The function uvd_v6_0_enc_get_destroy_msg is local to the source and
does not need to be in global scope, so make it static.

Cleans up sparse warning:
symbol 'uvd_v6_0_enc_get_destroy_msg' was not declared. Should it be
static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Christian König Oct. 11, 2017, 10:41 a.m. UTC | #1
Am 11.10.2017 um 11:21 schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
>
> The function uvd_v6_0_enc_get_destroy_msg is local to the source and
> does not need to be in global scope, so make it static.
>
> Cleans up sparse warning:
> symbol 'uvd_v6_0_enc_get_destroy_msg' was not declared. Should it be
> static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

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

> ---
>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> index 60af7310a234..71299c67c517 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> @@ -268,8 +268,9 @@ static int uvd_v6_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle
>    *
>    * Close up a stream for HW test or if userspace failed to do so
>    */
> -int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
> -				 bool direct, struct dma_fence **fence)
> +static int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring,
> +					uint32_t handle,
> +					bool direct, struct dma_fence **fence)
>   {
>   	const unsigned ib_size_dw = 16;
>   	struct amdgpu_job *job;
Alex Deucher Oct. 11, 2017, 4:28 p.m. UTC | #2
On Wed, Oct 11, 2017 at 6:41 AM, Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
> Am 11.10.2017 um 11:21 schrieb Colin King:
>>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The function uvd_v6_0_enc_get_destroy_msg is local to the source and
>> does not need to be in global scope, so make it static.
>>
>> Cleans up sparse warning:
>> symbol 'uvd_v6_0_enc_get_destroy_msg' was not declared. Should it be
>> static?
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>

Applied.  thanks!

Alex

>> ---
>>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
>> b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
>> index 60af7310a234..71299c67c517 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
>> @@ -268,8 +268,9 @@ static int uvd_v6_0_enc_get_create_msg(struct
>> amdgpu_ring *ring, uint32_t handle
>>    *
>>    * Close up a stream for HW test or if userspace failed to do so
>>    */
>> -int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t
>> handle,
>> -                                bool direct, struct dma_fence **fence)
>> +static int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring,
>> +                                       uint32_t handle,
>> +                                       bool direct, struct dma_fence
>> **fence)
>>   {
>>         const unsigned ib_size_dw = 16;
>>         struct amdgpu_job *job;
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index 60af7310a234..71299c67c517 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -268,8 +268,9 @@  static int uvd_v6_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle
  *
  * Close up a stream for HW test or if userspace failed to do so
  */
-int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
-				 bool direct, struct dma_fence **fence)
+static int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring,
+					uint32_t handle,
+					bool direct, struct dma_fence **fence)
 {
 	const unsigned ib_size_dw = 16;
 	struct amdgpu_job *job;