From: Imre Deak Date: Fri, 28 Jun 2019 14:36:27 +0000 (+0300) Subject: drm/i915: Sanitize the TypeC FIA lane configuration decoding X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4f36afb26cbeab7658b80350127b54667d31d618;p=openwrt%2Fstaging%2Fblogic.git drm/i915: Sanitize the TypeC FIA lane configuration decoding Use hex numbers, since that makes more sense when decoding a bit pattern. No functional change. Suggested-by: Ville Syrjälä Cc: Animesh Manna Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190628143635.22066-16-imre.deak@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c index 18a599a71bd3..58a228ba7696 100644 --- a/drivers/gpu/drm/i915/display/intel_tc.c +++ b/drivers/gpu/drm/i915/display/intel_tc.c @@ -52,15 +52,16 @@ int intel_tc_port_fia_max_lane_count(struct intel_digital_port *dig_port) switch (lane_mask) { default: MISSING_CASE(lane_mask); - case 1: - case 2: - case 4: - case 8: + /* fall-through */ + case 0x1: + case 0x2: + case 0x4: + case 0x8: return 1; - case 3: - case 12: + case 0x3: + case 0xc: return 2; - case 15: + case 0xf: return 4; } }