Skip to content

Commit 7335d95

Browse files
Josip Pavicalexdeucher
authored andcommitted
drm/amd/display: do not compare integers of different widths
[Why & How] Increase width of some variables to avoid comparing integers of different widths Signed-off-by: Josip Pavic <Josip.Pavic@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Bindu Ramamurthy <bindu.r@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 715bfff commit 7335d95

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/drm/amd/display/dc/core/dc_link.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ static bool dc_link_detect_helper(struct dc_link *link,
821821
{
822822
struct dc_sink_init_data sink_init_data = { 0 };
823823
struct display_sink_capability sink_caps = { 0 };
824-
uint8_t i;
824+
uint32_t i;
825825
bool converter_disable_audio = false;
826826
struct audio_support *aud_support = &link->dc->res_pool->audio_support;
827827
bool same_edid = false;

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ bool perform_link_training_with_retries(
17681768
enum signal_type signal,
17691769
bool do_fallback)
17701770
{
1771-
uint8_t j;
1771+
int j;
17721772
uint8_t delay_between_attempts = LINK_TRAINING_RETRY_DELAY;
17731773
struct dc_stream_state *stream = pipe_ctx->stream;
17741774
struct dc_link *link = stream->link;
@@ -2307,7 +2307,7 @@ bool dp_verify_link_cap_with_retries(
23072307
struct dc_link_settings *known_limit_link_setting,
23082308
int attempts)
23092309
{
2310-
uint8_t i = 0;
2310+
int i = 0;
23112311
bool success = false;
23122312

23132313
for (i = 0; i < attempts; i++) {

0 commit comments

Comments
 (0)