On ma, 2016-08-08 at 10:09 +0100, Chris Wilson wrote: > On Mon, Aug 08, 2016 at 12:01:07PM +0300, Joonas Lahtinen wrote: > > > > On su, 2016-08-07 at 15:45 +0100, Chris Wilson wrote: > > > +++ b/drivers/gpu/drm/i915/i915_drv.h > > > @@ -3903,4 +3903,6 @@ static inline bool __i915_request_irq_complete(struct drm_i915_gem_request *req) > > > return false; > > > } > > > > > > +#define nullify(ptr) ({typeof(*ptr) T = *(ptr); *(ptr) = NULL; T;}) > > > + > > Random lost hunk here. > In the next patches where I use i915_vma_create() I also use this > helper. It was just conveience. > As discussed in IRC, with proper name and to its own patch. > > > struct i915_vma * > > > +i915_vma_create(struct drm_i915_gem_object *obj, > > > + struct i915_address_space *vm, > > > + const struct i915_ggtt_view *view) > > > +{ > > > + GEM_BUG_ON(view ? i915_gem_obj_to_ggtt_view(obj, view) : i915_gem_obj_to_vma(obj, vm)); > > GEM_BUG_ON(view && !i915_is_ggtt(vm)) ? > We have that as a WARN_ON inside create(), I suspose it doesn't hurt > here either and documents the interface. That added; Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> Regards, Joonas > -Chris > -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx