drm/amdkfd: add missing void argument to function kgd2kfd_init

Submitted by Colin King on Oct. 5, 2019, 5:58 p.m.

Details

Message ID 20191005175808.32018-1-colin.king@canonical.com
State New
Headers show
Series "drm/amdkfd: add missing void argument to function kgd2kfd_init" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Colin King Oct. 5, 2019, 5:58 p.m.
From: Colin Ian King <colin.king@canonical.com>

Function kgd2kfd_init is missing a void argument, add it
to clean up the non-ANSI function declaration.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
index 986ff52d5750..f4b7f7e6c40e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
@@ -82,7 +82,7 @@  static void kfd_exit(void)
 	kfd_chardev_exit();
 }
 
-int kgd2kfd_init()
+int kgd2kfd_init(void)
 {
 	return kfd_init();
 }

Comments

On 10/5/19 10:58 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Function kgd2kfd_init is missing a void argument, add it
> to clean up the non-ANSI function declaration.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

sparse reports 2 such warnings in amdgpu:

../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_module.c:85:18: warning: non-ANSI function declaration of function 'kgd2kfd_init'
../drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:168:60: warning: non-ANSI function declaration of function 'amdgpu_amdkfd_gfx_10_0_get_functions'

Thanks.

> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> index 986ff52d5750..f4b7f7e6c40e 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> @@ -82,7 +82,7 @@ static void kfd_exit(void)
>  	kfd_chardev_exit();
>  }
>  
> -int kgd2kfd_init()
> +int kgd2kfd_init(void)
>  {
>  	return kfd_init();
>  }
>
On 05/10/2019 19:10, Randy Dunlap wrote:
> On 10/5/19 10:58 AM, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> Function kgd2kfd_init is missing a void argument, add it
>> to clean up the non-ANSI function declaration.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
> 
> sparse reports 2 such warnings in amdgpu:
> 
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_module.c:85:18: warning: non-ANSI function declaration of function 'kgd2kfd_init'
> ../drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:168:60: warning: non-ANSI function declaration of function 'amdgpu_amdkfd_gfx_10_0_get_functions'

Looking at linux-next, the amdgpu_amdkfd_gfx_10_0_get_functions() was
removed in commit:

commit e392c887df979112af94cfec08dd87f4dd55d085
Author: Yong Zhao <Yong.Zhao@amd.com>
Date:   Fri Sep 27 22:03:42 2019 -0400

    drm/amdkfd: Use array to probe kfd2kgd_calls

..so I didn't fix that one up

Coln
> 
> Thanks.
> 
>> ---
>>  drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
>> index 986ff52d5750..f4b7f7e6c40e 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c
>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
>> @@ -82,7 +82,7 @@ static void kfd_exit(void)
>>  	kfd_chardev_exit();
>>  }
>>  
>> -int kgd2kfd_init()
>> +int kgd2kfd_init(void)
>>  {
>>  	return kfd_init();
>>  }
>>
> 
>
On 10/5/19 11:23 AM, Colin Ian King wrote:
> On 05/10/2019 19:10, Randy Dunlap wrote:
>> On 10/5/19 10:58 AM, Colin King wrote:
>>> From: Colin Ian King <colin.king@canonical.com>
>>>
>>> Function kgd2kfd_init is missing a void argument, add it
>>> to clean up the non-ANSI function declaration.
>>>
>>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>>
>> Acked-by: Randy Dunlap <rdunlap@infradead.org>
>>
>> sparse reports 2 such warnings in amdgpu:
>>
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_module.c:85:18: warning: non-ANSI function declaration of function 'kgd2kfd_init'
>> ../drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:168:60: warning: non-ANSI function declaration of function 'amdgpu_amdkfd_gfx_10_0_get_functions'
> 
> Looking at linux-next, the amdgpu_amdkfd_gfx_10_0_get_functions() was
> removed in commit:
> 
> commit e392c887df979112af94cfec08dd87f4dd55d085
> Author: Yong Zhao <Yong.Zhao@amd.com>
> Date:   Fri Sep 27 22:03:42 2019 -0400
> 
>     drm/amdkfd: Use array to probe kfd2kgd_calls
> 
> ..so I didn't fix that one up

ah. Thanks.
On Sat, Oct 5, 2019 at 1:58 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Function kgd2kfd_init is missing a void argument, add it
> to clean up the non-ANSI function declaration.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> index 986ff52d5750..f4b7f7e6c40e 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> @@ -82,7 +82,7 @@ static void kfd_exit(void)
>         kfd_chardev_exit();
>  }
>
> -int kgd2kfd_init()
> +int kgd2kfd_init(void)
>  {
>         return kfd_init();
>  }
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
On 2019-10-07 12:08 p.m., Alex Deucher wrote:
> On Sat, Oct 5, 2019 at 1:58 PM Colin King <colin.king@canonical.com> wrote:

>> From: Colin Ian King <colin.king@canonical.com>

>>

>> Function kgd2kfd_init is missing a void argument, add it

>> to clean up the non-ANSI function declaration.

>>

>> Signed-off-by: Colin Ian King <colin.king@canonical.com>

> Applied.  thanks!


Thank you!


>

> Alex

>

>> ---

>>   drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 +-

>>   1 file changed, 1 insertion(+), 1 deletion(-)

>>

>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c

>> index 986ff52d5750..f4b7f7e6c40e 100644

>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c

>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c

>> @@ -82,7 +82,7 @@ static void kfd_exit(void)

>>          kfd_chardev_exit();

>>   }

>>

>> -int kgd2kfd_init()

>> +int kgd2kfd_init(void)

>>   {

>>          return kfd_init();

>>   }

>> --

>> 2.20.1

>>

>> _______________________________________________

>> dri-devel mailing list

>> dri-devel@lists.freedesktop.org

>> https://lists.freedesktop.org/mailman/listinfo/dri-devel