From 3ffce7fc35a6dcfefbefd856972ce09bedc60478 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 28 Jul 2022 15:20:01 +0200 Subject: [PATCH] 5.15-stable patches added patches: drm-amd-display-fix-wrong-format-specifier-in-amdgpu_dm.c.patch --- ...rong-format-specifier-in-amdgpu_dm.c.patch | 40 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 41 insertions(+) create mode 100644 queue-5.15/drm-amd-display-fix-wrong-format-specifier-in-amdgpu_dm.c.patch 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 index 00000000000..0af752d4fb7 --- /dev/null +++ b/queue-5.15/drm-amd-display-fix-wrong-format-specifier-in-amdgpu_dm.c.patch @@ -0,0 +1,40 @@ +From 655c167edc8c260b6df08bdcfaca8afde0efbeb6 Mon Sep 17 00:00:00 2001 +From: Hayden Goodfellow +Date: Sun, 12 Sep 2021 21:32:09 -0400 +Subject: drm/amd/display: Fix wrong format specifier in amdgpu_dm.c + +From: Hayden Goodfellow + +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 +Acked-by: Rodrigo Siqueira +Signed-off-by: Hayden Goodfellow +Signed-off-by: Alex Deucher +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman +--- + 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, ¬ify); + 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; + } diff --git a/queue-5.15/series b/queue-5.15/series index becdeb2c8ae..063b4c2319e 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -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 -- 2.47.3