On Thu, Apr 25, 2024 at 8:37 PM Tim Huang <Tim.Huang@xxxxxxx> wrote: > > Clear overflowed array index read warning by cast operation. > > Signed-off-by: Tim Huang <Tim.Huang@xxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c > index 06f0a6534a94..15c240656470 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c > @@ -473,8 +473,9 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf, > size_t size, loff_t *pos) > { > struct amdgpu_ring *ring = file_inode(f)->i_private; > - int r, i; > uint32_t value, result, early[3]; > + loff_t i; > + int r; > > if (*pos & 3 || size & 3) > return -EINVAL; > -- > 2.39.2 >