drm/i915: Get rid of silly void* from MST code
diff mbox series

Message ID 20200310202752.28454-1-ville.syrjala@linux.intel.com
State New
Headers show
Series
  • drm/i915: Get rid of silly void* from MST code
Related show

Commit Message

Ville Syrjälä March 10, 2020, 8:27 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Not sure why this thing is trying to avoid declaring the proper
type for these pointers. But since these are used only once let's
just get rid of the local variable entirely.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

José Roberto de Souza March 10, 2020, 9:12 p.m. UTC | #1
On Tue, 2020-03-10 at 22:27 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Not sure why this thing is trying to avoid declaring the proper
> type for these pointers. But since these are used only once let's
> just get rid of the local variable entirely.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index e08caca658c6..883ea11b9773 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -49,7 +49,6 @@ static int intel_dp_mst_compute_link_config(struct
> intel_encoder *encoder,
>  		to_intel_connector(conn_state->connector);
>  	const struct drm_display_mode *adjusted_mode =
>  		&crtc_state->hw.adjusted_mode;
> -	void *port = connector->port;
>  	bool constant_n = drm_dp_has_quirk(&intel_dp->desc, 0,
>  					   DP_DPCD_QUIRK_CONSTANT_N);
>  	int bpp, slots = -EINVAL;
> @@ -65,7 +64,8 @@ static int intel_dp_mst_compute_link_config(struct
> intel_encoder *encoder,
>  						       false);
>  
>  		slots = drm_dp_atomic_find_vcpi_slots(state, &intel_dp-
> >mst_mgr,
> -						      port, crtc_state-
> >pbn, 0);
> +						      connector->port,
> +						      crtc_state->pbn,
> 0);
>  		if (slots == -EDEADLK)
>  			return slots;
>  		if (slots >= 0)
> @@ -147,7 +147,6 @@ static int intel_dp_mst_compute_config(struct
> intel_encoder *encoder,
>  		to_intel_digital_connector_state(conn_state);
>  	const struct drm_display_mode *adjusted_mode =
>  		&pipe_config->hw.adjusted_mode;
> -	void *port = connector->port;
>  	struct link_config_limits limits;
>  	int ret;
>  
> @@ -159,7 +158,8 @@ static int intel_dp_mst_compute_config(struct
> intel_encoder *encoder,
>  
>  	if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
>  		pipe_config->has_audio =
> -			drm_dp_mst_port_has_audio(&intel_dp->mst_mgr,
> port);
> +			drm_dp_mst_port_has_audio(&intel_dp->mst_mgr,
> +						  connector->port);
>  	else
>  		pipe_config->has_audio =
>  			intel_conn_state->force_audio == HDMI_AUDIO_ON;

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index e08caca658c6..883ea11b9773 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -49,7 +49,6 @@  static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 		to_intel_connector(conn_state->connector);
 	const struct drm_display_mode *adjusted_mode =
 		&crtc_state->hw.adjusted_mode;
-	void *port = connector->port;
 	bool constant_n = drm_dp_has_quirk(&intel_dp->desc, 0,
 					   DP_DPCD_QUIRK_CONSTANT_N);
 	int bpp, slots = -EINVAL;
@@ -65,7 +64,8 @@  static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 						       false);
 
 		slots = drm_dp_atomic_find_vcpi_slots(state, &intel_dp->mst_mgr,
-						      port, crtc_state->pbn, 0);
+						      connector->port,
+						      crtc_state->pbn, 0);
 		if (slots == -EDEADLK)
 			return slots;
 		if (slots >= 0)
@@ -147,7 +147,6 @@  static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
 		to_intel_digital_connector_state(conn_state);
 	const struct drm_display_mode *adjusted_mode =
 		&pipe_config->hw.adjusted_mode;
-	void *port = connector->port;
 	struct link_config_limits limits;
 	int ret;
 
@@ -159,7 +158,8 @@  static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
 
 	if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
 		pipe_config->has_audio =
-			drm_dp_mst_port_has_audio(&intel_dp->mst_mgr, port);
+			drm_dp_mst_port_has_audio(&intel_dp->mst_mgr,
+						  connector->port);
 	else
 		pipe_config->has_audio =
 			intel_conn_state->force_audio == HDMI_AUDIO_ON;