From: Daniel Vetter Subject: Re: [PATCH 2/5] drm/i915: Introduce a for_each_crtc() macro Date: Tue, 13 May 2014 18:45:02 +0200 Message-ID: <20140513164502.GN3908@phenom.ffwll.local> References: <1399991428-32763-1-git-send-email-damien.lespiau@intel.com> <1399991428-32763-3-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-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 96C246E689 for ; Tue, 13 May 2014 09:45:06 -0700 (PDT) Received: by mail-ee0-f42.google.com with SMTP id d49so609906eek.29 for ; Tue, 13 May 2014 09:45:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1399991428-32763-3-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, May 13, 2014 at 03:30:25PM +0100, Damien Lespiau wrote: > Signed-off-by: Damien Lespiau cocinelle for these two over the entire tree? -Daniel > --- > drivers/gpu/drm/i915/i915_drv.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index 9ed53a9..f6967ef 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -163,6 +163,9 @@ enum hpd_pin { > #define for_each_pipe(p) for ((p) = 0; (p) < INTEL_INFO(dev)->num_pipes; (p)++) > #define for_each_sprite(p, s) for ((s) = 0; (s) < INTEL_INFO(dev)->num_sprites[(p)]; (s)++) > > +#define for_each_crtc(dev, crtc) \ > + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) > + > #define for_each_intel_crtc(dev, intel_crtc) \ > list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list, base.head) > > -- > 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