diff mbox

[3/3] drm/i915: Remove unused variable in hsw_write_infoframe()

Message ID 20180221021826.12006-3-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Souza, Jose Feb. 21, 2018, 2:18 a.m. UTC
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Dhinakaran Pandiyan Feb. 24, 2018, 1:49 a.m. UTC | #1
On Tue, 2018-02-20 at 18:18 -0800, José Roberto de Souza wrote:
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

> ---

>  drivers/gpu/drm/i915/intel_hdmi.c | 3 ---

>  1 file changed, 3 deletions(-)

> 

> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c

> index f5d7bfb43006..fe4bef081dae 100644

> --- a/drivers/gpu/drm/i915/intel_hdmi.c

> +++ b/drivers/gpu/drm/i915/intel_hdmi.c

> @@ -381,14 +381,11 @@ static void hsw_write_infoframe(struct drm_encoder *encoder,

>  	struct drm_i915_private *dev_priv = to_i915(dev);

>  	enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;

>  	i915_reg_t ctl_reg = HSW_TVIDEO_DIP_CTL(cpu_transcoder);

> -	i915_reg_t data_reg;

>  	int data_size = type == DP_SDP_VSC ?

>  		VIDEO_DIP_VSC_DATA_SIZE : VIDEO_DIP_DATA_SIZE;

>  	int i;

>  	u32 val = I915_READ(ctl_reg);

>  

> -	data_reg = hsw_dip_data_reg(dev_priv, cpu_transcoder, type, 0);

> -


Don't see any use for data_reg.

hsw_dip_data_reg() is somewhat useful as it warns if 'type' happens to
be invalid. But hsw_dip_data_reg() following this hunk should take care
of the warning.

Reviewed-by: Dhinakaran Pandiyan <dhinakara.pandiyan@intel.com> 



>  	val &= ~hsw_infoframe_enable(type);

>  	I915_WRITE(ctl_reg, val);

>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index f5d7bfb43006..fe4bef081dae 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -381,14 +381,11 @@  static void hsw_write_infoframe(struct drm_encoder *encoder,
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
 	i915_reg_t ctl_reg = HSW_TVIDEO_DIP_CTL(cpu_transcoder);
-	i915_reg_t data_reg;
 	int data_size = type == DP_SDP_VSC ?
 		VIDEO_DIP_VSC_DATA_SIZE : VIDEO_DIP_DATA_SIZE;
 	int i;
 	u32 val = I915_READ(ctl_reg);
 
-	data_reg = hsw_dip_data_reg(dev_priv, cpu_transcoder, type, 0);
-
 	val &= ~hsw_infoframe_enable(type);
 	I915_WRITE(ctl_reg, val);