]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu/pm: Fix the param type of set_power_profile_mode
authorMa Jun <Jun.Ma2@amd.com>
Sun, 28 Apr 2024 07:58:10 +0000 (15:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:12 +0000 (15:34 +0200)
commit05c1df9e893dd71cf29a60e810fc07f56f193086
tree78c9357b725f49a60e5f65d4c29bb8bc70974fc0
parent0ee7cfafcc221fc32e0ef808c5d926819f8d53b1
drm/amdgpu/pm: Fix the param type of set_power_profile_mode

[ Upstream commit f683f24093dd94a831085fe0ea8e9dc4c6c1a2d1 ]

Function .set_power_profile_mode need an array as input
parameter. So define variable workload as an array to fix
the below coverity warning.

"Passing &workload to function hwmgr->hwmgr_func->set_power_profile_mode
which uses it as an array. This might corrupt or misinterpret adjacent
memory locations"

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c