[AMD Official Use Only - General] This patch is, Reviewed-by: Tim Huang <Tim.Huang@xxxxxxx> > -----Original Message----- > From: Jesse Zhang <jesse.zhang@xxxxxxx> > Sent: Friday, May 10, 2024 10:51 AM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian > <Christian.Koenig@xxxxxxx>; Huang, Tim <Tim.Huang@xxxxxxx>; Zhang, > Jesse(Jie) <Jesse.Zhang@xxxxxxx>; Zhang, Jesse(Jie) > <Jesse.Zhang@xxxxxxx> > Subject: [PATCH 22/22] 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@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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: > -- > 2.25.1