From: jsg Date: Fri, 19 Nov 2021 03:17:33 +0000 (+0000) Subject: drm/amdgpu: fix warning for overflow check X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d458d8d3b86f0972e7157cf6a935c0e90581c088;p=openbsd drm/amdgpu: fix warning for overflow check From Arnd Bergmann 375150b3aaf8cf7d01f6f0b582e264dd2fded814 in linux 5.10.y/5.10.80 335aea75b0d95518951cad7c4c676e6f1c02c150 in mainline linux --- 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 *