]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/powerplay: Fix enum mismatch
authorMatthias Kaehlcke <mka@chromium.org>
Wed, 7 Feb 2018 18:58:43 +0000 (10:58 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:19:41 +0000 (14:19 -0500)
commita9816220d4308002c70d154a32e34b9692f1ceac
treeff2e375847f4d83ca3824b93f74f04600b8101ab
parent9636ee6e178b061ddd46a6fe837603b7316f4cb5
drm/amd/powerplay: Fix enum mismatch

In several locations the driver uses AMD_CG_STATE_UNGATE (type enum
amd_clockgating_state) instead of AMD_PG_STATE_UNGATE (type enum
amd_powergating_stat) and vice versa. Both constants have the same
value, so this doesn't cause any problems, but we still want to pass
the correct type.

Fixing the mismatch resolves multiple warnings like this when building
with clang:

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/cz_clockpowergating.c:169:7:
  error: implicit conversion from enumeration type 'enum
  amd_powergating_state' to different enumeration type 'enum
  amd_clockgating_state' [-Werror,-Wenum-conversion]
    AMD_PG_STATE_UNGATE);

Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c