Skip to content

Commit 6e5935b

Browse files
Assadian, Navidgregkh
authored andcommitted
drm/amd/display: Fix mismatch type comparison
[ Upstream commit 2687326 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 990e4fb commit 6e5935b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,8 @@ static bool spl_get_optimal_number_of_taps(
875875
bool *enable_isharp)
876876
{
877877
int num_part_y, num_part_c;
878-
int max_taps_y, max_taps_c;
879-
int min_taps_y, min_taps_c;
878+
unsigned int max_taps_y, max_taps_c;
879+
unsigned int min_taps_y, min_taps_c;
880880
enum lb_memory_config lb_config;
881881
bool skip_easf = false;
882882

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ struct spl_sharpness_range {
479479
};
480480
struct adaptive_sharpness {
481481
bool enable;
482-
int sharpness_level;
482+
unsigned int sharpness_level;
483483
struct spl_sharpness_range sharpness_range;
484484
};
485485
enum linear_light_scaling { // convert it in translation logic

0 commit comments

Comments
 (0)