Re: [PATCH] drm/i915: Use __is_constexpr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Jani Nikula (2019-03-21 09:50:25)
> On Wed, 20 Mar 2019, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> > gcc-4.8 and older dislike the use of __builtin_constant_p() within a
> > constant expression context, and so we must use the magical
> > __is_constexpr() instead.
> >
> > For example, with gcc-4.8.5:
> > ../drivers/gpu/drm/i915/i915_reg.h:167:27: error: first argument to ‘__builtin_choose_expr’ not a constant
> > ../include/linux/build_bug.h:16:45: error: bit-field ‘<anonymous>’ width not an integer constant
> >
> > Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> > Fixes: baa09e7d2f42 ("drm/i915: use REG_FIELD_PREP() to define register bitfield values")
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> > Cc: Imre Deak <imre.deak@xxxxxxxxx>
> > Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> 
> Thanks, Uma reported this too and confirmed __is_constexpr works.
> 
> Reported-by: Uma Shankar <uma.shankar@xxxxxxxxx>
> Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>

And pushed for a quieter tomorrow. Thanks everyone for reporting!
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux