Commit 60c0df33 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Drop pointless middle man variable

No need for the 'procmon' variable here. Just return the correct
thing from the switch statement directly.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-2-ville.syrjala@linux.intel.comReviewed-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 71690148
......@@ -53,7 +53,6 @@ static const struct icl_procmon {
static const struct icl_procmon *
icl_get_procmon_ref_values(struct drm_i915_private *dev_priv, enum phy phy)
{
const struct icl_procmon *procmon;
u32 val;
val = intel_de_read(dev_priv, ICL_PORT_COMP_DW3(phy));
......@@ -62,23 +61,16 @@ icl_get_procmon_ref_values(struct drm_i915_private *dev_priv, enum phy phy)
MISSING_CASE(val);
fallthrough;
case VOLTAGE_INFO_0_85V | PROCESS_INFO_DOT_0:
procmon = &icl_procmon_values[PROCMON_0_85V_DOT_0];
break;
return &icl_procmon_values[PROCMON_0_85V_DOT_0];
case VOLTAGE_INFO_0_95V | PROCESS_INFO_DOT_0:
procmon = &icl_procmon_values[PROCMON_0_95V_DOT_0];
break;
return &icl_procmon_values[PROCMON_0_95V_DOT_0];
case VOLTAGE_INFO_0_95V | PROCESS_INFO_DOT_1:
procmon = &icl_procmon_values[PROCMON_0_95V_DOT_1];
break;
return &icl_procmon_values[PROCMON_0_95V_DOT_1];
case VOLTAGE_INFO_1_05V | PROCESS_INFO_DOT_0:
procmon = &icl_procmon_values[PROCMON_1_05V_DOT_0];
break;
return &icl_procmon_values[PROCMON_1_05V_DOT_0];
case VOLTAGE_INFO_1_05V | PROCESS_INFO_DOT_1:
procmon = &icl_procmon_values[PROCMON_1_05V_DOT_1];
break;
return &icl_procmon_values[PROCMON_1_05V_DOT_1];
}
return procmon;
}
static void icl_set_procmon_ref_values(struct drm_i915_private *dev_priv,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment