diff options
author | Jesse Zhang <jesse.zhang@amd.com> | 2024-05-09 17:49:54 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-05-13 16:11:53 -0400 |
commit | b55bf19eb95e0ee3f97281d67dcaea9c8f5271d9 (patch) | |
tree | 5ff06f0e092d2b4ed9c248d408c32749b8f4857c | |
parent | 1940708ccf5aff76de4e0b399f99267c93a89193 (diff) |
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 <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: |