]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Apr 2022 16:49:34 +0000 (18:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Apr 2022 16:49:34 +0000 (18:49 +0200)
added patches:
drm-amdkfd-add-missing-void-argument-to-function-kgd2kfd_init.patch
drm-amdkfd-fix-wstrict-prototypes-from-amdgpu_amdkfd_gfx_10_0_get_functions.patch

queue-5.4/drm-amdkfd-add-missing-void-argument-to-function-kgd2kfd_init.patch [new file with mode: 0644]
queue-5.4/drm-amdkfd-fix-wstrict-prototypes-from-amdgpu_amdkfd_gfx_10_0_get_functions.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/drm-amdkfd-add-missing-void-argument-to-function-kgd2kfd_init.patch b/queue-5.4/drm-amdkfd-add-missing-void-argument-to-function-kgd2kfd_init.patch
new file mode 100644 (file)
index 0000000..8a33772
--- /dev/null
@@ -0,0 +1,37 @@
+From foo@baz Mon Apr 11 06:48:58 PM CEST 2022
+From: Nathan Chancellor <nathan@kernel.org>
+Date: Mon, 11 Apr 2022 09:43:07 -0700
+Subject: drm/amdkfd: add missing void argument to function kgd2kfd_init
+To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org>
+Cc: Felix Kuehling <Felix.Kuehling@amd.com>, Alex Deucher <alexander.deucher@amd.com>, Nick Desaulniers <ndesaulniers@google.com>, amd-gfx@lists.freedesktop.org, llvm@lists.linux.dev, stable@vger.kernel.org, Colin Ian King <colin.king@canonical.com>, Randy Dunlap <rdunlap@infradead.org>, Nathan Chancellor <nathan@kernel.org>
+Message-ID: <20220411164308.2491139-2-nathan@kernel.org>
+
+From: Nathan Chancellor <nathan@kernel.org>
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_module.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- 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();
+ }
diff --git a/queue-5.4/drm-amdkfd-fix-wstrict-prototypes-from-amdgpu_amdkfd_gfx_10_0_get_functions.patch b/queue-5.4/drm-amdkfd-fix-wstrict-prototypes-from-amdgpu_amdkfd_gfx_10_0_get_functions.patch
new file mode 100644 (file)
index 0000000..44b13af
--- /dev/null
@@ -0,0 +1,51 @@
+From foo@baz Mon Apr 11 06:48:58 PM CEST 2022
+From: Nathan Chancellor <nathan@kernel.org>
+Date: Mon, 11 Apr 2022 09:43:08 -0700
+Subject: drm/amdkfd: Fix -Wstrict-prototypes from amdgpu_amdkfd_gfx_10_0_get_functions()
+To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org>
+Cc: Felix Kuehling <Felix.Kuehling@amd.com>, Alex Deucher <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>
+Message-ID: <20220411164308.2491139-3-nathan@kernel.org>
+
+From: Nathan Chancellor <nathan@kernel.org>
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- 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 kfd2kg
+       .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;
+ }
index 6d8fc9be63434ca89594cabbf6bd011d42b21f44..1e7622c7d0228274592bcd65d2b7d7e54e5c2170 100644 (file)
@@ -463,3 +463,5 @@ mmc-mmci-stm32-correctly-check-all-elements-of-sg-list.patch
 mm-don-t-skip-swap-entry-even-if-zap_details-specified.patch
 arm64-module-remove-noload-from-linker-script.patch
 mm-sparsemem-fix-mem_section-will-never-be-null-gcc-12-warning.patch
+drm-amdkfd-add-missing-void-argument-to-function-kgd2kfd_init.patch
+drm-amdkfd-fix-wstrict-prototypes-from-amdgpu_amdkfd_gfx_10_0_get_functions.patch