On 24/02/2021 10:35, Michal Wajdeczko wrote:
Generic helpers should be placed in i915_utils.h.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Matthew Brost <[email protected]>
---
  drivers/gpu/drm/i915/i915_utils.h | 5 +++++
  drivers/gpu/drm/i915/i915_vma.h   | 5 -----
  2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_utils.h 
b/drivers/gpu/drm/i915/i915_utils.h
index 4618fe8aacb5..5bca71c90fe1 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -201,6 +201,11 @@ __check_struct_size(size_t base, size_t arr, size_t count, 
size_t *size)
        __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.
   *
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index a64adc8c883b..aed8e5bc233c 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -143,11 +143,6 @@ static inline void i915_vma_put(struct i915_vma *vma)
        i915_gem_object_put(vma->obj);
  }
-static __always_inline ptrdiff_t ptrdiff(const void *a, const void *b)
-{
-       return a - b;
-}
-
  static inline long
  i915_vma_compare(struct i915_vma *vma,
                 struct i915_address_space *vm,


Reviewed-by: Tvrtko Ursulin <[email protected]>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to