RE: [PATCH] drm/amdgpu: fix uninitialized scalar variable warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Public]

> -----Original Message-----
> From: Wang, Yang(Kevin) <KevinYang.Wang@xxxxxxx>
> Sent: Tuesday, April 30, 2024 12:14 PM
> To: Huang, Tim <Tim.Huang@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian
> <Christian.Koenig@xxxxxxx>
> Subject: RE: [PATCH] drm/amdgpu: fix uninitialized scalar variable warning
>
> [Public]
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Huang,
> Tim
> Sent: Tuesday, April 30, 2024 11:32 AM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian
> <Christian.Koenig@xxxxxxx>
> Subject: RE: [PATCH] drm/amdgpu: fix uninitialized scalar variable warning
>
> [Public]
>
> [Public]
>
> Ping ...
> > -----Original Message-----
> > From: Huang, Tim <Tim.Huang@xxxxxxx>
> > Sent: Friday, April 26, 2024 9:14 AM
> > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> > Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian
> > <Christian.Koenig@xxxxxxx>; Huang, Tim <Tim.Huang@xxxxxxx>
> > Subject: [PATCH] drm/amdgpu: fix uninitialized scalar variable warning
> >
> > Clear warning that field bp is uninitialized when calling
> > amdgpu_virt_ras_add_bps.
> >
> > Signed-off-by: Tim Huang <Tim.Huang@xxxxxxx>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> > index 54ab51a4ada7..a2f15edfe812 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> > @@ -395,6 +395,8 @@ static void amdgpu_virt_add_bad_page(struct
> > amdgpu_device *adev,
> >       else
> >               vram_usage_va = adev->mman.drv_vram_usage_va;
> >
> > +     memset(&bp, 0, sizeof(struct eeprom_table_record));
> [Kevin]:
>
> It is better to change code  to "sizeof (bp)".

Yes, agree, will change to this. Thanks.

Tim
>
> Reviewed-by: Yang Wang <kevinyang.wang@xxxxxxx>
>
> Best Regards,
> Kevin
> > +
> >       if (bp_block_size) {
> >               bp_cnt = bp_block_size / sizeof(uint64_t);
> >               for (bp_idx = 0; bp_idx < bp_cnt; bp_idx++) {
> > --
> > 2.39.2
>





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux