drm/dp_mst: Refactor drm_dp_mst_handle_up_req()
authorLyude Paul <lyude@redhat.com>
Tue, 3 Sep 2019 20:45:50 +0000 (16:45 -0400)
committerLyude Paul <lyude@redhat.com>
Tue, 3 Sep 2019 23:37:00 +0000 (19:37 -0400)
commita29d881875fc27c3ffe56af242adf38448b3d857
tree1f3e68ebb80db0d93e7677628ef572bfda5dec0c
parentfde61a7a7df46ce8206c8a7b3aa181c330113184
drm/dp_mst: Refactor drm_dp_mst_handle_up_req()

There's a couple of changes here, so to summarize:

* Remove the big ugly mgr->up_req_recv.have_eomt conditional to save on
  indenting
* Store &mgr->up_req_recv.initial_hdr in a variable so we don't keep
  going over 80 character long lines
* De-duplicate code for calling drm_dp_send_up_ack_reply() and getting
  the MSTB via it's GUID
* Remove all of the duplicate calls to memset() and just use a goto
  instead
* Actually do line wrapping
* Remove the unnecessary if (mstb) check before calling
  drm_dp_mst_topology_put_mstb() - we are guaranteed to always have
  mstb != NULL at that point in the function

Cc: Juston Li <juston.li@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <hwentlan@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-13-lyude@redhat.com
drivers/gpu/drm/drm_dp_mst_topology.c