@@ -888,6 +888,7 @@ icl_get_combo_buf_trans(struct drm_i915_private *dev_priv, enum port port,
*n_entries = ARRAY_SIZE(icl_combo_phy_ddi_translations_edp_1_05V);
return icl_combo_phy_ddi_translations_edp_1_05V;
default:
+ *n_entries = 1; /* shut up gcc */
MISSING_CASE(voltage);
return NULL;
}
@@ -903,6 +904,7 @@ icl_get_combo_buf_trans(struct drm_i915_private *dev_priv, enum port port,
*n_entries = ARRAY_SIZE(icl_combo_phy_ddi_translations_dp_hdmi_1_05V);
return icl_combo_phy_ddi_translations_dp_hdmi_1_05V;
default:
+ *n_entries = 1; /* shut up gcc */
MISSING_CASE(voltage);
return NULL;
}
Smatch warns that n_entries isn't always set, so copy'n'paste the common response used in the other setup paths to silence gcc. The advantage of fixing it in situ (rather than use a zero initialiser) is that the analysers are quite capable of then spotting the absence. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/gpu/drm/i915/intel_ddi.c | 2 ++ 1 file changed, 2 insertions(+)