All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lazar, Lijo" <lijo.lazar@amd.com>
To: Mario Limonciello <superm1@kernel.org>, amd-gfx@lists.freedesktop.org
Cc: Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: [PATCH 02/14] drm/amd: Avoid showing an error about memory allocation in amdgpu_acpi_enumerate_xcc()
Date: Fri, 28 Mar 2025 09:35:29 +0530	[thread overview]
Message-ID: <6147f825-536c-4e4f-8b5a-afdc97120946@amd.com> (raw)
In-Reply-To: <20250327203858.3796086-3-superm1@kernel.org>



On 3/28/2025 2:08 AM, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> checkpatch.pl complains about unnecessary error messages for failing
> to allocate memory. These aren't needed when the return code is -ENOMEM.

It's not about the error code. It conveys till what stage driver
proceeded and when the failure happened. I do see other instances in
kernel which do give an error message with -ENOMEM.

Thanks,
Lijo

> Drop such a message from amdgpu_acpi_enumerate_xcc().
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 1c5994de5a723..840901d65fed7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -1116,10 +1116,8 @@ static int amdgpu_acpi_enumerate_xcc(void)
>  
>  		xcc_info = kzalloc(sizeof(struct amdgpu_acpi_xcc_info),
>  				   GFP_KERNEL);
> -		if (!xcc_info) {
> -			DRM_ERROR("Failed to allocate memory for xcc info\n");
> +		if (!xcc_info)
>  			return -ENOMEM;
> -		}
>  
>  		INIT_LIST_HEAD(&xcc_info->list);
>  		xcc_info->handle = acpi_device_handle(acpi_dev);


  reply	other threads:[~2025-03-28  4:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 20:38 [PATCH 00/14] Convert more of amdgpu to drm_*() macros Mario Limonciello
2025-03-27 20:38 ` [PATCH 01/14] drm/amd: Use ACPI macros for amdgpu_acpi Mario Limonciello
2025-03-28 19:01   ` Alex Deucher
2025-03-27 20:38 ` [PATCH 02/14] drm/amd: Avoid showing an error about memory allocation in amdgpu_acpi_enumerate_xcc() Mario Limonciello
2025-03-28  4:05   ` Lazar, Lijo [this message]
2025-03-28 16:18     ` Mario Limonciello
2025-03-27 20:38 ` [PATCH 03/14] drm/amd: Convert dev_err_once() messages to drm_err_once() Mario Limonciello
2025-03-28 19:04   ` Alex Deucher
2025-03-31  4:20     ` Mario Limonciello
2025-03-27 20:38 ` [PATCH 04/14] drm/amd: Adjust amdgpu_vpe messages from dev_*() to drm_*() Mario Limonciello
2025-03-27 20:38 ` [PATCH 05/14] drm/amd: Adjust atombios parser messages from DRM_*() " Mario Limonciello
2025-03-27 20:38 ` [PATCH 06/14] drm/amd: Drop prototype for amdgpu_ucode_print_imu_hdr() Mario Limonciello
2025-03-27 20:38 ` [PATCH 07/14] drm/amd: Add a 'struct amdgpu_device' argument to all header printers Mario Limonciello
2025-03-27 20:38 ` [PATCH 08/14] drm/amd: Use drm_*() macros for all amdgpu_ucode prints Mario Limonciello
2025-03-27 20:38 ` [PATCH 09/14] drm/amd: Adjust amdgpu connector messages from DRM_*() to drm_*() Mario Limonciello
2025-03-27 20:38 ` [PATCH 10/14] drm/amd: Adjust amdgpu_atombios " Mario Limonciello
2025-03-27 20:38 ` [PATCH 11/14] drm/amd: Add struct amdgpu_device into amdgpu_gfx_parse_disable_cu() Mario Limonciello
2025-03-27 20:38 ` [PATCH 12/14] drm/amd: Add struct amdgpu_device argument to amdgpu_reset_create_reset_domain() Mario Limonciello
2025-03-27 20:38 ` [PATCH 13/14] drm/amd: Convert DRM_*() and dev_*() macros to drm_*() Mario Limonciello
2025-03-27 20:38 ` [PATCH 14/14] drm/amd: Drop 'amdgpu' from pr_fmt() Mario Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6147f825-536c-4e4f-8b5a-afdc97120946@amd.com \
    --to=lijo.lazar@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=mario.limonciello@amd.com \
    --cc=superm1@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.