Skip to content

Commit 1347b15

Browse files
srishanmalexdeucher
authored andcommitted
drm/amd/display: Replace ternary operator with min() in 'dm_helpers_parse_edid_caps'
Fixes the following coccicheck: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:120:41-42: WARNING opportunity for min() Cc: Harry Wentland <[email protected]> Cc: Rodrigo Siqueira <[email protected]> Cc: Aurabindo Pillai <[email protected]> Cc: Alex Deucher <[email protected]> Signed-off-by: Srinivasan Shanmugam <[email protected]> Reviewed-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1541981 commit 1347b15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
117117
if (sad_count <= 0)
118118
return result;
119119

120-
edid_caps->audio_mode_count = sad_count < DC_MAX_AUDIO_DESC_COUNT ? sad_count : DC_MAX_AUDIO_DESC_COUNT;
120+
edid_caps->audio_mode_count = min(sad_count, DC_MAX_AUDIO_DESC_COUNT);
121121
for (i = 0; i < edid_caps->audio_mode_count; ++i) {
122122
struct cea_sad *sad = &sads[i];
123123

0 commit comments

Comments
 (0)