diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_concurrent_all.c | 4 | ||||
-rw-r--r-- | tests/gem_mmap.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c index 2ebd30ab..66250849 100644 --- a/tests/gem_concurrent_all.c +++ b/tests/gem_concurrent_all.c @@ -243,7 +243,7 @@ static void create_userptr_require(const struct create *create, unsigned count) has_userptr = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &arg) == 0; - free((void *)(uintptr_t)arg.user_ptr); + free(from_user_pointer(arg.user_ptr)); } } @@ -275,7 +275,7 @@ userptr_create_bo(const struct buffers *b) userptr.user_size, 0); igt_assert(bo); #endif - bo->virtual = (void *)(uintptr_t)userptr.user_ptr; + bo->virtual = from_user_pointer(userptr.user_ptr); return bo; } diff --git a/tests/gem_mmap.c b/tests/gem_mmap.c index 2e0d725f..0ed15878 100644 --- a/tests/gem_mmap.c +++ b/tests/gem_mmap.c @@ -142,7 +142,7 @@ igt_main arg.size = OBJECT_SIZE; ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &arg); igt_assert(ret == 0); - addr = (uint8_t *)(uintptr_t)arg.addr_ptr; + addr = from_user_pointer(arg.addr_ptr); igt_info("Testing contents of newly created object.\n"); memset(expected, 0, sizeof(expected)); |