Re: [PATCH] drm/i915: throw __must_check at GEM_WARN_ON

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

 



Quoting Joonas Lahtinen (2018-04-06 12:29:01)
> Quoting Matthew Auld (2018-04-04 14:19:04)
> > GEM_WARN_ON is intended to be used as:
> > 
> > if (GEM_WARN_ON(expr))
> >         ...
> > 
> > However this isn't clear since we just wrap WARN_ON, therefore throw a
> > warning if the result is ignored. For !DRM_I915_DEBUG_GEM builds this
> > should already be the case.
> > 
> > Suggested-by: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
> > Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> 
> I think this would be a worthwhile improvement.

At the very least may I beg for the GEM_TRACE output and #expr?
#expr kind of defeats the use of an inline... Or at least requires more
macro magic.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux