diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-02 11:05:21 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-02 11:17:13 +0000 |
commit | 4de67b26788c60c19254c3e69e151ee200453895 (patch) | |
tree | 566eda27dcfe0f8266ba1931681003b9b76d8642 /tests/gem_madvise.c | |
parent | 0517d877b65bade23332cba0828acae7ae5fccb9 (diff) |
igt: Mass conversion to to_user_pointer()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_madvise.c')
-rw-r--r-- | tests/gem_madvise.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gem_madvise.c b/tests/gem_madvise.c index 24d58dd5..d44a60af 100644 --- a/tests/gem_madvise.c +++ b/tests/gem_madvise.c @@ -119,7 +119,7 @@ dontneed_before_pwrite(void) gem_pwrite.handle = gem_create(fd, OBJECT_SIZE); gem_pwrite.offset = 0; gem_pwrite.size = sizeof(buf); - gem_pwrite.data_ptr = (uintptr_t)buf; + gem_pwrite.data_ptr = to_user_pointer(buf); gem_madvise(fd, gem_pwrite.handle, I915_MADV_DONTNEED); igt_assert(drmIoctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &gem_pwrite)); @@ -144,7 +144,7 @@ dontneed_before_exec(void) gem_write(fd, exec.handle, 0, buf, sizeof(buf)); gem_madvise(fd, exec.handle, I915_MADV_DONTNEED); - execbuf.buffers_ptr = (uintptr_t)&exec; + execbuf.buffers_ptr = to_user_pointer(&exec); execbuf.buffer_count = 1; execbuf.batch_len = sizeof(buf); gem_execbuf(fd, &execbuf); |