RE: [PATCH] drm/amdgpu: print warning when input address is invalid

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

 



[AMD Official Use Only - Internal Distribution Only]



> -----Original Message-----
> From: Chen, Guchun <Guchun.Chen@xxxxxxx>
> Sent: 2020年5月22日 15:53
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Zhang, Hawking
> <Hawking.Zhang@xxxxxxx>; Zhou1, Tao <Tao.Zhou1@xxxxxxx>;
> Clements, John <John.Clements@xxxxxxx>; Li, Dennis
> <Dennis.Li@xxxxxxx>
> Cc: Chen, Guchun <Guchun.Chen@xxxxxxx>
> Subject: [PATCH] drm/amdgpu: print warning when input address is invalid
> 
> This will assist debug.
> 
> Signed-off-by: Guchun Chen <guchun.chen@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 6e911ca97038..5c73f444eaef 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -318,6 +318,8 @@ static ssize_t amdgpu_ras_debugfs_ctrl_write(struct
> file *f, const char __user *
>  	case 2:
>  		if ((data.inject.address >= adev->gmc.mc_vram_size) ||
>  		    (data.inject.address >= RAS_UMC_INJECT_ADDR_LIMIT)) {
> +			dev_warn(adev->dev, "Input address 0x%llx is
> invalid.",
> +					data.inject.address);

[Tao] How about this way:
dev_warn(adev->dev, "RAS injection address 0x%llx exceeds limit 0x%llx.",
				data.inject.address, RAS_UMC_INJECT_ADDR_LIMIT);

>  			ret = -EINVAL;
>  			break;
>  		}
> --
> 2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




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

  Powered by Linux