Skip to content

Commit 2687326

Browse files
Assadian, Navidalexdeucher
authored andcommitted
drm/amd/display: Fix mismatch type comparison
The mismatch type comparison/assignment may cause data loss. Since the values are always non-negative, it is safe to use unsigned variables to resolve the mismatch. Signed-off-by: Navid Assadian <navid.assadian@amd.com> Reviewed-by: Joshua Aberback <joshua.aberback@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent fba4d19 commit 2687326

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,8 @@ static bool spl_get_optimal_number_of_taps(
944944
bool *enable_isharp)
945945
{
946946
int num_part_y, num_part_c;
947-
int max_taps_y, max_taps_c;
948-
int min_taps_y, min_taps_c;
947+
unsigned int max_taps_y, max_taps_c;
948+
unsigned int min_taps_y, min_taps_c;
949949
enum lb_memory_config lb_config;
950950
bool skip_easf = false;
951951
bool is_subsampled = spl_is_subsampled_format(spl_in->basic_in.format);

drivers/gpu/drm/amd/display/dc/sspl/dc_spl_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ struct spl_sharpness_range {
493493
};
494494
struct adaptive_sharpness {
495495
bool enable;
496-
int sharpness_level;
496+
unsigned int sharpness_level;
497497
struct spl_sharpness_range sharpness_range;
498498
};
499499
enum linear_light_scaling { // convert it in translation logic

0 commit comments

Comments
 (0)