[Intel-gfx] [PATCH i-g-t v3] tests/perf: Fix pointer length compilation errors on 32-bit systems

Chris Wilson chris at chris-wilson.co.uk
Wed Dec 21 13:03:30 UTC 2016


On Wed, Dec 21, 2016 at 05:15:09AM -0500, Robert Foss wrote:
> Fix pointer length compilations errors on 32-bit systems.
> 
> Signed-off-by: Robert Foss <robert.foss at collabora.com>
> ---
>  tests/perf.c | 47 ++++++++++++++++++++++++++---------------------
>  1 file changed, 26 insertions(+), 21 deletions(-)
> 
> diff --git a/tests/perf.c b/tests/perf.c
> index 87df9f00..27681368 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -205,6 +205,11 @@ static uint64_t timestamp_frequency = 12500000;
>  
>  static igt_render_copyfunc_t render_copy = NULL;
>  
> +static inline uint64_t to_user_pointer(void *ptr)
> +{
> +	return (uint64_t)(uintptr_t)ptr;
> +}

Lgtm, I would plonk this in perhaps ioctl_wrappers.h or igt_core.h to
ease future patches removing this double cast.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list