]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jul 2022 13:20:01 +0000 (15:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jul 2022 13:20:01 +0000 (15:20 +0200)
added patches:
drm-amd-display-fix-wrong-format-specifier-in-amdgpu_dm.c.patch

queue-5.15/drm-amd-display-fix-wrong-format-specifier-in-amdgpu_dm.c.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/drm-amd-display-fix-wrong-format-specifier-in-amdgpu_dm.c.patch b/queue-5.15/drm-amd-display-fix-wrong-format-specifier-in-amdgpu_dm.c.patch
new file mode 100644 (file)
index 0000000..0af752d
--- /dev/null
@@ -0,0 +1,40 @@
+From 655c167edc8c260b6df08bdcfaca8afde0efbeb6 Mon Sep 17 00:00:00 2001
+From: Hayden Goodfellow <Hayden.Goodfellow@amd.com>
+Date: Sun, 12 Sep 2021 21:32:09 -0400
+Subject: drm/amd/display: Fix wrong format specifier in amdgpu_dm.c
+
+From: Hayden Goodfellow <Hayden.Goodfellow@amd.com>
+
+commit 655c167edc8c260b6df08bdcfaca8afde0efbeb6 upstream.
+
+[Why]
+Currently, the 32bit kernel build fails due to an incorrect string
+format specifier. ARRAY_SIZE() returns size_t type as it uses sizeof().
+However, we specify it in a string as %ld. This causes a compiler error
+and causes the 32bit build to fail.
+
+[How]
+Change the %ld to %zu as size_t (which sizeof() returns) is an unsigned
+integer data type. We use 'z' to ensure it also works with 64bit build.
+
+Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
+Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
+Signed-off-by: Hayden Goodfellow <Hayden.Goodfellow@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -758,7 +758,7 @@ static void dm_dmub_outbox1_low_irq(void
+                       do {
+                               dc_stat_get_dmub_notification(adev->dm.dc, &notify);
+                               if (notify.type >= ARRAY_SIZE(dm->dmub_thread_offload)) {
+-                                      DRM_ERROR("DM: notify type %d larger than the array size %ld !", notify.type,
++                                      DRM_ERROR("DM: notify type %d larger than the array size %zu!", notify.type,
+                                       ARRAY_SIZE(dm->dmub_thread_offload));
+                                       continue;
+                               }
index becdeb2c8aefa8fe5c7f959e7e1a098d432486c4..063b4c2319e5bfaf13058dca9cfa05bb1938ff37 100644 (file)
@@ -199,3 +199,4 @@ kvm-x86-fix-typo-in-__try_cmpxchg_user-causing-non-atomicness.patch
 x86-drop-bogus-cc-clobber-from-__try_cmpxchg_user_asm.patch
 drm-amdgpu-off-by-one-in-dm_dmub_outbox1_low_irq.patch
 x86-entry_32-fix-segment-exceptions.patch
+drm-amd-display-fix-wrong-format-specifier-in-amdgpu_dm.c.patch