Skip to content

Commit 63e8813

Browse files
Assadian, Navidjfvogel
authored andcommitted
drm/amd/display: Fix mismatch type comparison
[ Upstream commit 26873260d394b1e33cdd720154aedf0af95327f9 ] 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 <[email protected]> Reviewed-by: Joshua Aberback <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 6e5935b755b4a81ccebde4eed0ebd37f5875ddb3) Signed-off-by: Jack Vogel <[email protected]>
1 parent 998b7c8 commit 63e8813

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)