drm/amd/display: do not compare integers of different widths
authorJosip Pavic <Josip.Pavic@amd.com>
Sun, 23 Jan 2022 18:19:59 +0000 (13:19 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jan 2022 23:00:34 +0000 (18:00 -0500)
[Why & How]
Increase width of some variables to avoid comparing integers of
different widths

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Josip Pavic <Josip.Pavic@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c

index 147a03a1500b51e06ecde65fc4bc03024984595f..f8f363773920e170ca9ef34d90d55f8cf9dd19cb 100644 (file)
@@ -4744,7 +4744,7 @@ const struct link_resource *dc_link_get_cur_link_res(const struct dc_link *link)
 void dc_get_cur_link_res_map(const struct dc *dc, uint32_t *map)
 {
        struct dc_link *link;
-       uint8_t i;
+       uint32_t i;
        uint32_t hpo_dp_recycle_map = 0;
 
        *map = 0;
@@ -4785,7 +4785,7 @@ void dc_get_cur_link_res_map(const struct dc *dc, uint32_t *map)
 void dc_restore_link_res_map(const struct dc *dc, uint32_t *map)
 {
        struct dc_link *link;
-       uint8_t i;
+       uint32_t i;
        unsigned int available_hpo_dp_count;
        uint32_t hpo_dp_recycle_map = (*map & LINK_RES_HPO_DP_REC_MAP__MASK)
                        >> LINK_RES_HPO_DP_REC_MAP__SHIFT;