]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: Drop redundant syncobj handle limit checks in userq ioctls
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Sun, 1 Mar 2026 12:49:50 +0000 (18:19 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Mar 2026 21:43:42 +0000 (16:43 -0500)
commit750cbc4fbd4909476e0ffccb19e6333dd68d7380
tree5dea8437bfd75bccf5262dd532f347f45dbd320e
parent0d21084c02864fc95df18c5cdd3bab6efafdd406
drm/amdgpu: Drop redundant syncobj handle limit checks in userq ioctls

Clang warns that comparing a __u16 value against 65536 is always false.

num_syncobj_handles is defined as __u16 in both the userq signal and
wait ioctl argument structs, so it can never exceed 65535. The checks
against AMDGPU_USERQ_MAX_HANDLES are therefore redundant and trigger
-Wtautological-constant-out-of-range-compare.

Fixes: Clang -Wtautological-constant-out-of-range-compare in userq
signal/wait ioctls

Fixes: d8e760b7996d ("drm/amdgpu: update type for num_syncobj_handles in drm_amdgpu_userq_signal")
Fixes: c561d2320492 ("drm/amdgpu: update type for num_syncobj_handles in drm_amdgpu_userq_wait")
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c