On Thu, 30 Jan 2020, Akeem G Abodunrin <[email protected]> wrote:
> diff --git a/drivers/gpu/drm/i915/i915_utils.h 
> b/drivers/gpu/drm/i915/i915_utils.h
> index b0ade76bec90..7ac5b3565845 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -172,6 +172,11 @@ __check_struct_size(size_t base, size_t arr, size_t 
> count, size_t *size)
>       (typeof(ptr))(__v + 1);                                         \
>  })
>  
> +#define ptr_align(ptr, align) ({                                     \
> +     unsigned long __v = (unsigned long)(ptr);                       \
> +     (typeof(ptr))round_up(__v, (align));                            \
> +})
> +

There's PTR_ALIGN() in include/kernel.h.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to