]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Use proper enum conversion functions
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 4 Jul 2019 05:52:16 +0000 (22:52 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Aug 2019 15:17:40 +0000 (10:17 -0500)
commit22ead1e2f5e4d27e90ef7651a075e7090b176a62
treea105b7edfb2391d18471252b61f23abd8dc421f6
parent9e172020d4cab9d351523fc1fb500c464dd64396
drm/amd/display: Use proper enum conversion functions

clang warns:

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:336:8:
warning: implicit conversion from enumeration type 'enum smu_clk_type'
to different enumeration type 'enum amd_pp_clock_type'
[-Wenum-conversion]
                                        dc_to_smu_clock_type(clk_type),
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:421:14:
warning: implicit conversion from enumeration type 'enum
amd_pp_clock_type' to different enumeration type 'enum smu_clk_type'
[-Wenum-conversion]
                                        dc_to_pp_clock_type(clk_type),
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are functions to properly convert between all of these types, use
them so there are no longer any warnings.

Fixes: eb83cc959d2f ("drm/amd/powerplay: add function get_clock_by_type_with_latency for navi10")
Fixes: 138d7fcad116 ("drm/amd/powerplay: add interface to get clock by type with latency for display (v2)")
Link: https://github.com/ClangBuiltLinux/linux/issues/586
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c