drm/amd/display: Add const to a function
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tue, 28 Feb 2023 22:53:10 +0000 (15:53 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 22 Mar 2023 04:59:08 +0000 (00:59 -0400)
commitc964b86e322f91f409aead79b1b497b74ae0f795
tree7feab2102c549055d933ccf4d603667cb86d2a52
parent28e5c9d601fb8c2f387516b095a9cf6ddf7c00d5
drm/amd/display: Add const to a function

When calling the dc_link_bw_kbps_from_raw_frl_link_rate_data from
amdgpu_dm, GCC highlighted the following issue:

  In function ‘get_conv_frl_bw’:
  error: passing argument 1 of
  ‘dc_link_bw_kbps_from_raw_frl_link_rate_data’ discards ‘const’ qualifier
  from pointer target type [-Werror=discarded-qualifiers]
  997 |                                 aconnector->dc_link->dc,

This commit fix this issue by making DC a constant variable since we
only use it to invoke the function
bw_kbps_from_raw_frl_link_rate_data().

Reviewed-by: Chris Park <Chris.Park@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c
drivers/gpu/drm/amd/display/dc/dc.h