]> www.infradead.org Git - users/jedix/linux-maple.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)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 May 2024 19:17:07 +0000 (15:17 -0400)
commitf683f24093dd94a831085fe0ea8e9dc4c6c1a2d1
tree8854f466c39b99c49bd734ed907d0d64c64cbf20
parent0991e49d2b73bb4189f83a49eb41cdf16976bbf6
drm/amdgpu/pm: Fix the param type of set_power_profile_mode

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