[PATCH] drm/amdgpu: Fixed warning reported by kernel test robot
Zhou1, Tao
Tao.Zhou1 at amd.com
Tue Feb 22 08:39:26 UTC 2022
[AMD Official Use Only]
With my inline concerns addressed, the patch is:
Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
> -----Original Message-----
> From: Chai, Thomas <YiPeng.Chai at amd.com>
> Sent: Tuesday, February 22, 2022 3:07 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Chai, Thomas <YiPeng.Chai at amd.com>; Zhang, Hawking
> <Hawking.Zhang at amd.com>; Zhou1, Tao <Tao.Zhou1 at amd.com>; Clements,
> John <John.Clements at amd.com>; Chai, Thomas <YiPeng.Chai at amd.com>
> Subject: [PATCH] drm/amdgpu: Fixed warning reported by kernel test robot
[Tao] "Fix warnings for RAS reported by robot" is recommended
>
> Fixed warning reported by kernel test robot:
[Tao]: Fixed -> Fix
> 1.warning: no previous prototype for function
> 'amdgpu_ras_block_late_init_default'.
> 2.warning: variable 'ras_obj' is used uninitialized whenever '||' condition is true.
>
> Signed-off-by: yipechai <YiPeng.Chai at amd.com>
[Tao]: "Reported-by: kernel test robot <lkp at intel.com>" can be added
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index e5874df3c9ca..a73567ea03d5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -2400,7 +2400,7 @@ bool amdgpu_ras_is_poison_mode_supported(struct
> amdgpu_device *adev) int amdgpu_ras_block_late_init(struct amdgpu_device
> *adev,
> struct ras_common_if *ras_block)
> {
> - struct amdgpu_ras_block_object *ras_obj;
> + struct amdgpu_ras_block_object *ras_obj = NULL;
> struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
> unsigned long ue_count, ce_count;
> int r;
> @@ -2456,7 +2456,7 @@ int amdgpu_ras_block_late_init(struct
> amdgpu_device *adev,
> return r;
> }
>
> -int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev,
> +static int amdgpu_ras_block_late_init_default(struct amdgpu_device
> +*adev,
> struct ras_common_if *ras_block)
> {
> return amdgpu_ras_block_late_init(adev, ras_block);
> --
> 2.25.1
More information about the amd-gfx
mailing list