* [PATCH 5.4 1/2] drm/amdkfd: add missing void argument to function kgd2kfd_init
2022-04-11 16:43 [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd Nathan Chancellor
@ 2022-04-11 16:43 ` Nathan Chancellor
2022-04-11 16:43 ` [PATCH 5.4 2/2] drm/amdkfd: Fix -Wstrict-prototypes from amdgpu_amdkfd_gfx_10_0_get_functions() Nathan Chancellor
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2022-04-11 16:43 UTC (permalink / raw)
To: Greg Kroah-Hartman, Sasha Levin
Cc: Felix Kuehling, Alex Deucher, Nick Desaulniers, amd-gfx, llvm,
stable, Colin Ian King, Randy Dunlap, Nathan Chancellor
From: Colin Ian King <colin.king@canonical.com>
commit 63617d8b125ed9f674133dd000b6df58d6b2965a upstream.
Function kgd2kfd_init is missing a void argument, add it
to clean up the non-ANSI function declaration.
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
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.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 5.4 2/2] drm/amdkfd: Fix -Wstrict-prototypes from amdgpu_amdkfd_gfx_10_0_get_functions()
2022-04-11 16:43 [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd Nathan Chancellor
2022-04-11 16:43 ` [PATCH 5.4 1/2] drm/amdkfd: add missing void argument to function kgd2kfd_init Nathan Chancellor
@ 2022-04-11 16:43 ` Nathan Chancellor
2022-04-11 16:48 ` [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd Deucher, Alexander
2022-04-11 16:49 ` Greg Kroah-Hartman
3 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2022-04-11 16:43 UTC (permalink / raw)
To: Greg Kroah-Hartman, Sasha Levin
Cc: Felix Kuehling, Alex Deucher, Nick Desaulniers, amd-gfx, llvm,
stable, Nathan Chancellor
This patch is for linux-5.4.y only, it has no equivalent change
upstream.
When building x86_64 allmodconfig with tip of tree clang, there is an
instance of -Wstrict-prototypes:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:168:59: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
struct kfd2kgd_calls *amdgpu_amdkfd_gfx_10_0_get_functions()
^
void
1 error generated.
amdgpu_amdkfd_gfx_10_0_get_functions() is prototyped properly in
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h but its definition in
amdgpu_amdkfd_gfx_v10.c does not have the argument types specified,
which causes the warning. GCC does not warn because it permits an
old-style definition if the prototype has the argument types.
This code was eliminated by commit e392c887df97 ("drm/amdkfd: Use array
to probe kfd2kgd_calls"), which was a part of a larger series that does
not look very suitable for stable. Just fix this one location, as it was
the only instance of this new warning across a variety of builds.
Fixes: 6bdadb207224 ("drm/amdgpu: Add navi10 kfd support for amdgpu (v3)")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
index ce30d4e8bf25..f7c4337c1ffe 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
@@ -165,7 +165,7 @@ static const struct kfd2kgd_calls kfd2kgd = {
.get_tile_config = amdgpu_amdkfd_get_tile_config,
};
-struct kfd2kgd_calls *amdgpu_amdkfd_gfx_10_0_get_functions()
+struct kfd2kgd_calls *amdgpu_amdkfd_gfx_10_0_get_functions(void)
{
return (struct kfd2kgd_calls *)&kfd2kgd;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd
2022-04-11 16:43 [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd Nathan Chancellor
2022-04-11 16:43 ` [PATCH 5.4 1/2] drm/amdkfd: add missing void argument to function kgd2kfd_init Nathan Chancellor
2022-04-11 16:43 ` [PATCH 5.4 2/2] drm/amdkfd: Fix -Wstrict-prototypes from amdgpu_amdkfd_gfx_10_0_get_functions() Nathan Chancellor
@ 2022-04-11 16:48 ` Deucher, Alexander
2022-04-11 16:49 ` Greg Kroah-Hartman
3 siblings, 0 replies; 5+ messages in thread
From: Deucher, Alexander @ 2022-04-11 16:48 UTC (permalink / raw)
To: Nathan Chancellor, Greg Kroah-Hartman, Sasha Levin
Cc: Kuehling, Felix, Nick Desaulniers, amd-gfx, llvm, stable
[Public]
> -----Original Message-----
> From: Nathan Chancellor <nathan@kernel.org>
> Sent: Monday, April 11, 2022 12:43 PM
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Sasha Levin
> <sashal@kernel.org>
> Cc: Kuehling, Felix <Felix.Kuehling@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Nick Desaulniers
> <ndesaulniers@google.com>; amd-gfx@lists.freedesktop.org;
> llvm@lists.linux.dev; stable@vger.kernel.org; Nathan Chancellor
> <nathan@kernel.org>
> Subject: [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd
>
> Hi everyone,
>
> These two patches resolve two instances of -Wstrict-prototypes with newer
> versions of clang that are present in 5.4. The main Makefile makes this a hard
> error.
>
> The first patch is upstream commit 63617d8b125e ("drm/amdkfd: add missing
> void argument to function kgd2kfd_init"), which showed up in 5.5.
>
> The second patch has no upstream equivalent, as the code in question was
> removed in commit e392c887df97 ("drm/amdkfd: Use array to probe
> kfd2kgd_calls") upstream, which is part of a larger series that did not look
> reasonable for stable. I opted to just fix the warning in the same manner as
> the prior patch, which is less risky and accomplishes the same end result of no
> warning.
>
> Colin Ian King (1):
> drm/amdkfd: add missing void argument to function kgd2kfd_init
>
> Nathan Chancellor (1):
> drm/amdkfd: Fix -Wstrict-prototypes from
> amdgpu_amdkfd_gfx_10_0_get_functions()
Series is:
Acked-by: Alex Deucher <alexander.deucher@amd.com>
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 2 +-
> drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>
> base-commit: 2845ff3fd34499603249676495c524a35e795b45
> --
> 2.35.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd
2022-04-11 16:43 [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd Nathan Chancellor
` (2 preceding siblings ...)
2022-04-11 16:48 ` [PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd Deucher, Alexander
@ 2022-04-11 16:49 ` Greg Kroah-Hartman
3 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2022-04-11 16:49 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Sasha Levin, Felix Kuehling, Alex Deucher, Nick Desaulniers,
amd-gfx, llvm, stable
On Mon, Apr 11, 2022 at 09:43:06AM -0700, Nathan Chancellor wrote:
> Hi everyone,
>
> These two patches resolve two instances of -Wstrict-prototypes with
> newer versions of clang that are present in 5.4. The main Makefile makes
> this a hard error.
>
> The first patch is upstream commit 63617d8b125e ("drm/amdkfd: add
> missing void argument to function kgd2kfd_init"), which showed up in
> 5.5.
>
> The second patch has no upstream equivalent, as the code in question was
> removed in commit e392c887df97 ("drm/amdkfd: Use array to probe
> kfd2kgd_calls") upstream, which is part of a larger series that did not
> look reasonable for stable. I opted to just fix the warning in the same
> manner as the prior patch, which is less risky and accomplishes the same
> end result of no warning.
>
> Colin Ian King (1):
> drm/amdkfd: add missing void argument to function kgd2kfd_init
>
> Nathan Chancellor (1):
> drm/amdkfd: Fix -Wstrict-prototypes from
> amdgpu_amdkfd_gfx_10_0_get_functions()
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 2 +-
> drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>
> base-commit: 2845ff3fd34499603249676495c524a35e795b45
> --
> 2.35.1
>
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread