From: Hayden Goodfellow Date: Mon, 13 Sep 2021 01:32:09 +0000 (-0400) Subject: drm/amd/display: Fix wrong format specifier in amdgpu_dm.c X-Git-Tag: v5.15.73~1906 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6e4817ab622f526d6afe9e02c6d85b177b3e846;p=platform%2Fkernel%2Flinux-rpi.git drm/amd/display: Fix wrong format specifier in amdgpu_dm.c 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 --- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index adf0517..e3dfea3 100644 --- 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 *interrupt_params) 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; }