From: Jesse Zhang Date: Thu, 9 May 2024 09:49:54 +0000 (+0800) Subject: drm/amdgpu: clear the warning unsigned compared against 0 for xcp_id X-Git-Tag: microblaze-v6.13~537^2~32^2~238 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=b55bf19eb95e0ee3f97281d67dcaea9c8f5271d9;p=linux-2.6-microblaze.git drm/amdgpu: clear the warning unsigned compared against 0 for xcp_id This greater-than-or-equal-to-zero comparison of an unsigned value is always true. fpriv->xcp_id >= 0U Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 977cde6d1362..66782be5917b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -618,7 +618,7 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) return -EINVAL; if (adev->xcp_mgr && adev->xcp_mgr->num_xcps > 0 && - fpriv->xcp_id >= 0 && fpriv->xcp_id < adev->xcp_mgr->num_xcps) { + fpriv->xcp_id < adev->xcp_mgr->num_xcps) { xcp = &adev->xcp_mgr->xcp[fpriv->xcp_id]; switch (type) { case AMD_IP_BLOCK_TYPE_GFX: