From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Use for_each_pipe() when possible Date: Thu, 11 Jul 2013 21:53:24 +0200 Message-ID: <20130711195324.GY6143@phenom.ffwll.local> References: <1373569854-15527-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id C934BE6539 for ; Thu, 11 Jul 2013 12:53:22 -0700 (PDT) Received: by mail-ee0-f49.google.com with SMTP id b57so5760382eek.22 for ; Thu, 11 Jul 2013 12:53:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1373569854-15527-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 11, 2013 at 08:10:54PM +0100, Damien Lespiau wrote: > Came accross two open coding of for_each_pipe(), might as well use the > macro. > > Signed-off-by: Damien Lespiau Queued for -next, thanks for the patch. -Daniel > --- > drivers/gpu/drm/i915/intel_display.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 218bc93..d426c0c 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -1111,7 +1111,7 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv, > } > > /* Need to check both planes against the pipe */ > - for (i = 0; i < INTEL_INFO(dev)->num_pipes; i++) { > + for_each_pipe(i) { > reg = DSPCNTR(i); > val = I915_READ(reg); > cur_pipe = (val & DISPPLANE_SEL_PIPE_MASK) >> > @@ -9524,7 +9524,7 @@ void intel_modeset_init(struct drm_device *dev) > INTEL_INFO(dev)->num_pipes, > INTEL_INFO(dev)->num_pipes > 1 ? "s" : ""); > > - for (i = 0; i < INTEL_INFO(dev)->num_pipes; i++) { > + for_each_pipe(i) { > intel_crtc_init(dev, i); > for (j = 0; j < dev_priv->num_plane; j++) { > ret = intel_plane_init(dev, i, j); > -- > 1.8.3.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch