diff mbox

[4/5] drm/i915: Favor for_each_pipe() macro

Message ID 1505375586-23015-5-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola Sept. 14, 2017, 7:53 a.m. UTC
Favor for_each_pipe() macro when looping through pipes.

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 drivers/gpu/drm/i915/intel_pipe_crc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ville Syrjälä Oct. 10, 2017, 9:17 a.m. UTC | #1
On Thu, Sep 14, 2017 at 10:53:05AM +0300, Mika Kahola wrote:
> Favor for_each_pipe() macro when looping through pipes.
> 
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pipe_crc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
> index 24d781f..7efe3b7 100644
> --- a/drivers/gpu/drm/i915/intel_pipe_crc.c
> +++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
> @@ -208,7 +208,7 @@ static int display_crc_ctl_show(struct seq_file *m, void *data)
>  	struct drm_i915_private *dev_priv = m->private;
>  	int i;

Could also do the 'enum pipe pipe' change here. Looks like it shouldn't
cause too much noise in the patch.

>  
> -	for (i = 0; i < I915_MAX_PIPES; i++)
> +	for_each_pipe(dev_priv, i)
>  		seq_printf(m, "%c %s\n", pipe_name(i),
>  			   pipe_crc_source_name(dev_priv->pipe_crc[i].source));
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
index 24d781f..7efe3b7 100644
--- a/drivers/gpu/drm/i915/intel_pipe_crc.c
+++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
@@ -208,7 +208,7 @@  static int display_crc_ctl_show(struct seq_file *m, void *data)
 	struct drm_i915_private *dev_priv = m->private;
 	int i;
 
-	for (i = 0; i < I915_MAX_PIPES; i++)
+	for_each_pipe(dev_priv, i)
 		seq_printf(m, "%c %s\n", pipe_name(i),
 			   pipe_crc_source_name(dev_priv->pipe_crc[i].source));