]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix wrong format specifier in amdgpu_dm.c
authorHayden Goodfellow <Hayden.Goodfellow@amd.com>
Mon, 13 Sep 2021 01:32:09 +0000 (21:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:33 +0000 (17:25 +0200)
commitff83c2fe37ec15127a40b5fdbe9fb29f01ec1c95
tree9cec9f48f4d5de2c2350175f19f4cc5522e1e885
parent0cdcdd40f6a46a883cf7c9c463c3a46861b33483
drm/amd/display: Fix wrong format specifier in amdgpu_dm.c

commit c089f90591716d3e83d07dcdff3d9f293c80b2d0 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