Skip to content

Commit

Permalink
drm/amd/display: Fix mismatch type comparison
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Assadian, Navid authored and Alex Deucher committed Feb 25, 2025
1 parent fba4d19 commit 2687326
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,8 @@ static bool spl_get_optimal_number_of_taps(
bool *enable_isharp)
{
int num_part_y, num_part_c;
int max_taps_y, max_taps_c;
int min_taps_y, min_taps_c;
unsigned int max_taps_y, max_taps_c;
unsigned int min_taps_y, min_taps_c;
enum lb_memory_config lb_config;
bool skip_easf = false;
bool is_subsampled = spl_is_subsampled_format(spl_in->basic_in.format);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/display/dc/sspl/dc_spl_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ struct spl_sharpness_range {
};
struct adaptive_sharpness {
bool enable;
int sharpness_level;
unsigned int sharpness_level;
struct spl_sharpness_range sharpness_range;
};
enum linear_light_scaling { // convert it in translation logic
Expand Down

0 comments on commit 2687326

Please sign in to comment.