[PATCH] drm/amdpgu: Fix printk() should include KERN_<LEVEL> in 'amdgpu_atpx_verify_interface'

Chen, Guchun Guchun.Chen at amd.com
Fri Jul 28 09:54:15 UTC 2023


[Public]

Reviewed-by: Guchun Chen <guchun.chen at amd.com>

Regards,
Guchun

> -----Original Message-----
> From: SHANMUGAM, SRINIVASAN <SRINIVASAN.SHANMUGAM at amd.com>
> Sent: Friday, July 28, 2023 2:01 PM
> To: Koenig, Christian <Christian.Koenig at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>; Chen, Guchun <Guchun.Chen at amd.com>
> Cc: amd-gfx at lists.freedesktop.org; SHANMUGAM, SRINIVASAN
> <SRINIVASAN.SHANMUGAM at amd.com>
> Subject: [PATCH] drm/amdpgu: Fix printk() should include KERN_<LEVEL> in
> 'amdgpu_atpx_verify_interface'
>
> Prefer dev_err over printk variant so that we get better debug info when
> there are multiple GPUs in the system.
>
> Fixes the below:
>
> WARNING: printk() should include KERN_<LEVEL> facility level
> +               printk("ATPX buffer is too small: %zu\n", size)
>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> index 6f241c574665..dccebe6aaad4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> @@ -280,7 +280,7 @@ static int amdgpu_atpx_verify_interface(struct
> amdgpu_atpx *atpx)
>
>       size = *(u16 *) info->buffer.pointer;
>       if (size < 8) {
> -             printk("ATPX buffer is too small: %zu\n", size);
> +             dev_err(dev, "ATPX buffer is too small: %zu\n", size);
>               err = -EINVAL;
>               goto out;
>       }
> --
> 2.25.1



More information about the amd-gfx mailing list