]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pp: use mlck_table.count for array loop index limit
authorColin Ian King <colin.king@canonical.com>
Wed, 21 Mar 2018 18:26:53 +0000 (18:26 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Mar 2018 14:42:00 +0000 (09:42 -0500)
commit9b6319c60901f724b8544897bf7e13fb47bc329c
treea6a8e5e68a695ef77de34eb719a8a3bae6e0f1d9
parenta73968feec56b6041633cf336510e7b3218f8411
drm/amd/pp: use mlck_table.count for array loop index limit

v2: use temporaries to trivially reduces object size.

The for-loops process data in the mclk_table but use slck_table.count
as the loop index limit.  I believe these are cut-n-paste errors from
the previous almost identical loops as indicated by static analysis.
Fix these.

Detected by CoverityScan, CID#1466001 ("Copy-paste error")

Fixes: 8dceeab2e66a ("drm/amd/pp: Add and initialize OD_dpm_table for CI/VI.")
Fixes: e67fde607fdb ("drm/amd/pp: Implement edit_dpm_table on smu7")
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c