]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix build warnings
authorGuenter Roeck <linux@roeck-us.net>
Wed, 21 Apr 2021 16:18:02 +0000 (09:18 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:06:42 +0000 (18:06 -0400)
commit85dadf166e8c3a1be3c5f3550f52f12c9ad016a4
tree2501bb5c772a2f5c6f54175ac69e68ba52508edc
parente2442bc2516e084cce21fd74b45640e5141df979
drm/amd/display: Fix build warnings

Fix the following build warnings.

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
In function ‘dm_update_mst_vcpi_slots_for_dsc’:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46:
warning: variable ‘old_con_state’ set but not used

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
In function ‘amdgpu_dm_commit_cursors’:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7709:44:
warning: variable ‘new_plane_state’ set but not used

The variables were introduced to be used in iterators, but not used.
Use other iterators which don't require the unused variables.

Fixes: ab4628ac5cd26 ("drm/amd/display: Disable cursors before disabling planes")
Fixes: 46bd5dcda3df9 ("drm/amd/display: Recalculate VCPI slots for new DSC connectors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c