[PATCH 2/2] drm/radeon: Prefer dev_warn over printk
Chen, Guchun
Guchun.Chen at amd.com
Wed Jul 19 08:22:39 UTC 2023
[Public]
Looks good.
Reviewed-by: Guchun Chen <guchun.chen at amd.com>
Regards,
Guchun
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Srinivasan Shanmugam
> Sent: Wednesday, July 19, 2023 1:20 PM
> To: Koenig, Christian <Christian.Koenig at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>
> Cc: Srinivasan Shanmugam <srinivasan.shanmugam at amd.corp-
> partner.google.com>; SHANMUGAM, SRINIVASAN
> <SRINIVASAN.SHANMUGAM at amd.com>; amd-gfx at lists.freedesktop.org
> Subject: [PATCH 2/2] drm/radeon: Prefer dev_warn over printk
>
> From: Srinivasan Shanmugam <srinivasan.shanmugam at amd.corp-
> partner.google.com>
>
> Fixes the following checkpatch.pl:
>
> WARNING: printk() should include KERN_<LEVEL> facility level
>
> 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/radeon/radeon_atpx_handler.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> index d0b450a06506..875a995fff66 100644
> --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> @@ -115,7 +115,7 @@ static union acpi_object
> *radeon_atpx_call(acpi_handle handle, int function,
>
> /* Fail only if calling the method fails and ATPX is supported */
> if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
> - printk("failed to evaluate ATPX got %s\n",
> + pr_err("failed to evaluate ATPX got %s\n",
> acpi_format_exception(status));
> kfree(buffer.pointer);
> return NULL;
> @@ -171,7 +171,7 @@ static int radeon_atpx_validate(struct radeon_atpx
> *atpx)
>
> size = *(u16 *) info->buffer.pointer;
> if (size < 10) {
> - printk("ATPX buffer is too small: %zu\n", size);
> + pr_err("ATPX buffer is too small: %zu\n", size);
> kfree(info);
> return -EINVAL;
> }
> @@ -202,7 +202,7 @@ static int radeon_atpx_validate(struct radeon_atpx
> *atpx)
>
> atpx->is_hybrid = false;
> if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) {
> - printk("ATPX Hybrid Graphics\n");
> + pr_info("ATPX Hybrid Graphics\n");
> /*
> * Disable legacy PM methods only when pcie port PM is
> usable,
> * otherwise the device might fail to power off or power on.
> @@ -239,7 +239,7 @@ static int radeon_atpx_verify_interface(struct
> radeon_atpx *atpx)
>
> size = *(u16 *) info->buffer.pointer;
> if (size < 8) {
> - printk("ATPX buffer is too small: %zu\n", size);
> + pr_err("ATPX buffer is too small: %zu\n", size);
> err = -EINVAL;
> goto out;
> }
> @@ -248,7 +248,7 @@ static int radeon_atpx_verify_interface(struct
> radeon_atpx *atpx)
> memcpy(&output, info->buffer.pointer, size);
>
> /* TODO: check version? */
> - printk("ATPX version %u, functions 0x%08x\n",
> + pr_info("ATPX version %u, functions 0x%08x\n",
> output.version, output.function_bits);
>
> radeon_atpx_parse_functions(&atpx->functions,
> output.function_bits);
> --
> 2.25.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 16608 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20230719/6c11d666/attachment-0001.bin>
More information about the amd-gfx
mailing list