dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/atomic-helper: Remove redundant local var old_crtc_state in disable_outputs
@ 2016-01-18  3:36 Liu Ying
  2016-01-18  6:56 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Ying @ 2016-01-18  3:36 UTC (permalink / raw)
  To: David Airlie; +Cc: dri-devel

One of the two local variables old_crtc_state is redundantly defined in the
function disable_outputs().  It has only a scope partway through the block
for_each_connector_in_state.  So, let's remove it and use the one which
has the scope within the function disable_outputs().

Signed-off-by: Liu Ying <gnuiyl@gmail.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 57cccd6..b9d8b53 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -617,7 +617,6 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
 	for_each_connector_in_state(old_state, connector, old_conn_state, i) {
 		const struct drm_encoder_helper_funcs *funcs;
 		struct drm_encoder *encoder;
-		struct drm_crtc_state *old_crtc_state;
 
 		/* Shut down everything that's in the changeset and currently
 		 * still on. So need to check the old, saved state. */
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/atomic-helper: Remove redundant local var old_crtc_state in disable_outputs
  2016-01-18  3:36 [PATCH] drm/atomic-helper: Remove redundant local var old_crtc_state in disable_outputs Liu Ying
@ 2016-01-18  6:56 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2016-01-18  6:56 UTC (permalink / raw)
  To: Liu Ying; +Cc: dri-devel

On Mon, Jan 18, 2016 at 11:36:35AM +0800, Liu Ying wrote:
> One of the two local variables old_crtc_state is redundantly defined in the
> function disable_outputs().  It has only a scope partway through the block
> for_each_connector_in_state.  So, let's remove it and use the one which
> has the scope within the function disable_outputs().
> 
> Signed-off-by: Liu Ying <gnuiyl@gmail.com>

Applied to drm-misc, thanks.
-Daniel

> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 57cccd6..b9d8b53 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -617,7 +617,6 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
>  	for_each_connector_in_state(old_state, connector, old_conn_state, i) {
>  		const struct drm_encoder_helper_funcs *funcs;
>  		struct drm_encoder *encoder;
> -		struct drm_crtc_state *old_crtc_state;
>  
>  		/* Shut down everything that's in the changeset and currently
>  		 * still on. So need to check the old, saved state. */
> -- 
> 2.5.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-18  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18  3:36 [PATCH] drm/atomic-helper: Remove redundant local var old_crtc_state in disable_outputs Liu Ying
2016-01-18  6:56 ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox