Skip to content

Commit

Permalink
drm/i915: Replace some hand rolled max()s
Browse files Browse the repository at this point in the history
Use max() instead of hand rolling it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-8-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
  • Loading branch information
Ville Syrjälä committed Jun 3, 2020
1 parent f6adb5f commit e2db552
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/gpu/drm/i915/display/intel_dp_link_training.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,8 @@ void intel_dp_get_adjust_train(struct intel_dp *intel_dp,
u8 preemph_max;

for (lane = 0; lane < intel_dp->lane_count; lane++) {
u8 this_v = drm_dp_get_adjust_request_voltage(link_status, lane);
u8 this_p = drm_dp_get_adjust_request_pre_emphasis(link_status, lane);

if (this_v > v)
v = this_v;
if (this_p > p)
p = this_p;
v = max(v, drm_dp_get_adjust_request_voltage(link_status, lane));
p = max(p, drm_dp_get_adjust_request_pre_emphasis(link_status, lane));
}

preemph_max = intel_dp->preemph_max(intel_dp);
Expand Down

0 comments on commit e2db552

Please sign in to comment.