mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 08:01:59 +00:00
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 <harry.wentland@amd.com> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
15419813f2
commit
1347b15d5e
@ -117,7 +117,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
|
||||
if (sad_count <= 0)
|
||||
return result;
|
||||
|
||||
edid_caps->audio_mode_count = sad_count < DC_MAX_AUDIO_DESC_COUNT ? sad_count : DC_MAX_AUDIO_DESC_COUNT;
|
||||
edid_caps->audio_mode_count = min(sad_count, DC_MAX_AUDIO_DESC_COUNT);
|
||||
for (i = 0; i < edid_caps->audio_mode_count; ++i) {
|
||||
struct cea_sad *sad = &sads[i];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user