diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-11-19 03:17:34 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-11-19 03:17:34 +0000 |
commit | 605fba37f7931d21a58cc90f91dc6ecbf5972bca (patch) | |
tree | da34e21c7e1d1194eea05f36e0d54699cf4217ab /sys/dev | |
parent | b1f90b32458511b081f8475ed446a695ebde9449 (diff) |
drm/amdgpu: fix warning for overflow check
From Arnd Bergmann
375150b3aaf8cf7d01f6f0b582e264dd2fded814 in linux 5.10.y/5.10.80
335aea75b0d95518951cad7c4c676e6f1c02c150 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.c index a53836703f7..0f4a525cfc9 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.c @@ -61,7 +61,7 @@ static void amdgpu_bo_list_free(struct kref *ref) int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp, struct drm_amdgpu_bo_list_entry *info, - unsigned num_entries, struct amdgpu_bo_list **result) + size_t num_entries, struct amdgpu_bo_list **result) { unsigned last_entry = 0, first_userptr = num_entries; struct amdgpu_bo_list_entry *array; diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.h b/sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.h index f5fb5ba11ad..4e1cde91a3a 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.h +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_bo_list.h @@ -60,7 +60,7 @@ int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in, int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp, struct drm_amdgpu_bo_list_entry *info, - unsigned num_entries, + size_t num_entries, struct amdgpu_bo_list **list); static inline struct amdgpu_bo_list_entry * |