drm/i915: Promote ptrdiff() to i915_utils.h
Generic helpers should be placed in i915_utils.h. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-9-matthew.brost@intel.com
This commit is contained in:
Родитель
882be6e0b7
Коммит
d6e9c96560
|
@ -201,6 +201,11 @@ __check_struct_size(size_t base, size_t arr, size_t count, size_t *size)
|
||||||
__T; \
|
__T; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
static __always_inline ptrdiff_t ptrdiff(const void *a, const void *b)
|
||||||
|
{
|
||||||
|
return a - b;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* container_of_user: Extract the superclass from a pointer to a member.
|
* container_of_user: Extract the superclass from a pointer to a member.
|
||||||
*
|
*
|
||||||
|
|
|
@ -146,11 +146,6 @@ static inline void i915_vma_put(struct i915_vma *vma)
|
||||||
i915_gem_object_put(vma->obj);
|
i915_gem_object_put(vma->obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __always_inline ptrdiff_t ptrdiff(const void *a, const void *b)
|
|
||||||
{
|
|
||||||
return a - b;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline long
|
static inline long
|
||||||
i915_vma_compare(struct i915_vma *vma,
|
i915_vma_compare(struct i915_vma *vma,
|
||||||
struct i915_address_space *vm,
|
struct i915_address_space *vm,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче