[Intel-gfx] [PATCH 1/6] drm/i915: Turn DEV_INFO_FLAGS into for foreach style macro

Damien Lespiau damien.lespiau at intel.com
Tue Apr 23 13:08:55 CEST 2013


On Tue, Apr 23, 2013 at 10:20:54AM +0300, Jani Nikula wrote:
> On Mon, 22 Apr 2013, Damien Lespiau <damien.lespiau at intel.com> wrote:
> > DEV_INFO_FOR_FLAG() now takes 2 parameters:
> >   • A function to apply to the flag
> >   • A separator
> 
> Oooh, fancy bullets. ;)

2013 is definitely the year of Unicode!

> Tiny bikeshed, is leaving out #undefs for the temp macros intentional?

It was. Before when wanting two invocations of DEV_INFO_FLAGS, you had
to define the same macros twice (DEV_INFO_FLAG/DEV_INFO_SEP), so to be
defensive about that #undef was added after DEV_INFO_FLAGS.

Now DEV_INFO_FOR_EACH_FLAG() takes the macro/sep to apply to each flag so
you can leave the macro defined, the second invocation will define its
own transformation (or reuse an existing one).

-- 
Damien



More information about the Intel-gfx mailing list