mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Basavaraj Natikar <bnatikar@amd.com>
To: Eder Zulian <ezulian@redhat.com>,
	Basavaraj.Natikar@amd.com, vkoul@kernel.org,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: ptdma: Remove dead code from pt_dmaengine_register()
Date: Tue, 15 Apr 2025 09:15:49 +0530	[thread overview]
Message-ID: <bb0ef9d2-a100-4dfb-8754-ec8fa33ef6ba@amd.com> (raw)
In-Reply-To: <20250411165451.240830-1-ezulian@redhat.com>


On 4/11/2025 10:24 PM, Eder Zulian wrote:
> devm_kasprintf() is used to allocate and format a string and the
> returned pointer is assigned to 'cmd_cache_name'. However, the variable
> 'cmd_cache_name' is not effectively used.
>
> Remove the dead code.
>
> Signed-off-by: Eder Zulian <ezulian@redhat.com>
> ---
>   drivers/dma/amd/ptdma/ptdma-dmaengine.c | 7 -------
>   1 file changed, 7 deletions(-)
>
> diff --git a/drivers/dma/amd/ptdma/ptdma-dmaengine.c b/drivers/dma/amd/ptdma/ptdma-dmaengine.c
> index 715ac3ae067b..3a8014fb9cb4 100644
> --- a/drivers/dma/amd/ptdma/ptdma-dmaengine.c
> +++ b/drivers/dma/amd/ptdma/ptdma-dmaengine.c
> @@ -565,7 +565,6 @@ int pt_dmaengine_register(struct pt_device *pt)
>   	struct ae4_device *ae4 = NULL;
>   	struct pt_dma_chan *chan;
>   	char *desc_cache_name;
> -	char *cmd_cache_name;
>   	int ret, i;
>   
>   	if (pt->ver == AE4_DMA_VERSION)
> @@ -581,12 +580,6 @@ int pt_dmaengine_register(struct pt_device *pt)
>   	if (!pt->pt_dma_chan)
>   		return -ENOMEM;
>   
> -	cmd_cache_name = devm_kasprintf(pt->dev, GFP_KERNEL,
> -					"%s-dmaengine-cmd-cache",
> -					dev_name(pt->dev));
> -	if (!cmd_cache_name)
> -		return -ENOMEM;
> -
>   	desc_cache_name = devm_kasprintf(pt->dev, GFP_KERNEL,
>   					 "%s-dmaengine-desc-cache",
>   					 dev_name(pt->dev));

Looks good to me.

Acked-by: Basavaraj Natikar<Basavaraj.Natikar@amd.com>

Thanks,
--
Basavaraj


  parent reply	other threads:[~2025-04-15  3:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11 16:54 Eder Zulian
2025-04-14 22:48 ` Nathan Lynch
2025-04-15  3:45 ` Basavaraj Natikar [this message]
2025-04-17 15:18 ` Vinod Koul

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=bb0ef9d2-a100-4dfb-8754-ec8fa33ef6ba@amd.com \
    --to=bnatikar@amd.com \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=ezulian@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®