mesa-drm/amdgpu
Michel Dänzer c6493f360e amdgpu: Eliminate void* arithmetic in amdgpu_find_bo_by_cpu_mapping
Arithmetic using void* pointers isn't defined by the C standard, only as
a GCC extension. Avoids compiler warnings:

../../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’:
../../amdgpu/amdgpu_bo.c:554:48: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
   if (cpu >= bo->cpu_ptr && cpu < (bo->cpu_ptr + bo->alloc_size))
                                                ^
../../amdgpu/amdgpu_bo.c:561:23: warning: pointer of type ‘void *’ used in subtraction [-Wpointer-arith]
   *offset_in_bo = cpu - bo->cpu_ptr;
                       ^

v2: Use uintptr_t instead of char*, don't change function signature
    (Junwei Zhang)

Fixes: 4d454424e1 ("amdgpu: add a function to find bo by cpu mapping
                     (v2)")
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2018-08-17 09:12:42 +02:00
..
.editorconfig Add meson build system 2018-01-12 09:40:48 -08:00
amdgpu-symbol-check *-symbol-check: Don't hard-code nm executable 2018-02-23 17:53:08 +00:00
amdgpu.h amdgpu: add a function to find bo by cpu mapping (v2) 2018-08-08 12:37:49 +02:00
amdgpu_asic_id.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
amdgpu_bo.c amdgpu: Eliminate void* arithmetic in amdgpu_find_bo_by_cpu_mapping 2018-08-17 09:12:42 +02:00
amdgpu_cs.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
amdgpu_device.c amdgpu: use handle table for flink names 2018-08-07 13:27:28 +02:00
amdgpu_gpu_info.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
amdgpu_internal.h amdgpu: use handle table for flink names 2018-08-07 13:27:28 +02:00
amdgpu_vamgr.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
amdgpu_vm.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
Android.mk amdgpu: Only remember the device's marketing name 2017-12-05 12:50:20 +01:00
handle_table.c amdgpu: fix off by one in handle_table_insert 2018-08-16 08:50:04 +02:00
handle_table.h amdgpu: add handle table implementation v2 2018-08-07 13:27:16 +02:00
libdrm_amdgpu.pc.in amdgpu: add libdrm as private requirement/dependency 2016-02-04 13:22:50 +00:00
Makefile.am amdgpu: Only remember the device's marketing name 2017-12-05 12:50:20 +01:00
Makefile.sources amdgpu: remove the hash table implementation 2018-08-07 13:27:33 +02:00
meson.build libdrm: Fix amdgpu build failure 2018-08-07 13:58:21 +01:00