drm/amdgpu
Geert Uytterhoeven ca041d5fe6 amdgpu: Fix pointer/integer mismatch warning
On 32-bit:

    ../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’:
    ../amdgpu/amdgpu_bo.c:554:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
           cpu < (void*)((uintptr_t)bo->cpu_ptr + bo->alloc_size))
                 ^

Indeed, as amdgpu_bo_info.alloc_size is "uint64_t", the sum is
always 64-bit, while "void *" can be 32-bit or 64-bit.

Fix this by casting bo->alloc_size to "size_t", which is either
32-bit or 64-bit, just like "void *".

Fixes: c6493f360e ("amdgpu: Eliminate void* arithmetic in amdgpu_find_bo_by_cpu_mapping")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
---
v2:
  - Add Reviewed-by.
2023-09-04 09:31:36 +02:00
..
.editorconfig Add meson build system 2018-01-12 09:40:48 -08:00
Android.mk 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
amdgpu-symbols.txt amdgpu: implement new CTX OP to set/get stable pstates 2022-01-20 18:32:46 +01:00
amdgpu.h amdgpu: implement new CTX OP to set/get stable pstates 2022-01-20 18:32:46 +01:00
amdgpu_asic_id.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
amdgpu_bo.c amdgpu: Fix pointer/integer mismatch warning 2023-09-04 09:31:36 +02:00
amdgpu_cs.c amdgpu: add an environment variable that overrides the context priority 2023-05-11 12:53:29 -04:00
amdgpu_device.c amdgpu: Add a default marketing name if none is found 2022-10-17 16:19:44 -04:00
amdgpu_gpu_info.c amdgpu: add function of INFO ioctl for querying video caps 2021-04-06 08:58:57 -04:00
amdgpu_internal.h amdgpu: remove va::dev member 2023-03-24 11:25:10 +01:00
amdgpu_vamgr.c amdgpu: remove va::dev member 2023-03-24 11:25:10 +01:00
amdgpu_vm.c amdgpu: annotate public functions 2018-09-19 22:46:45 -07: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
meson.build meson: drop pthread-stubs dependency on BSDs 2023-02-10 14:58:52 +00:00