mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: Rosen Penev <rosenp@gmail.com>, dmaengine@vger.kernel.org
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:FREESCALE SOC DRIVERS" <linuxppc-dev@lists.ozlabs.org>,
	"moderated list:FREESCALE SOC DRIVERS"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCHv3] dmaengine: bestcomm: use platform machinery to get irq
Date: Fri, 18 Sep 2026 08:17:44 +0200	[thread overview]
Message-ID: <5b086e1a-8b8c-4536-8b64-e0169826ab33@kernel.org> (raw)
In-Reply-To: <20260918001835.154305-1-rosenp@gmail.com>



Le 18/09/2026 à 02:18, Rosen Penev a écrit :
> platform_get_irq() avoids having to explicitly map and dispose of an irq
> by having the platform_device machinery take care of it.
> 
> This requires replacing the device_node with a platform_device in the
> bcom_eng struct so that platform_get_irq() can use it.
> 
> Conveniently, this also allows getting rid of of_node_get and
> of_node_put as the platform_device machinery also handles that.
> 
> Adjust the goto labels in bcom_task_alloc to match what is being freed.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>   v3: drop stale description
>   v2: resend
>   drivers/dma/bestcomm/bestcomm.c            | 47 ++++++++--------------
>   include/linux/fsl/bestcomm/bestcomm_priv.h |  2 +-
>   2 files changed, 18 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/dma/bestcomm/bestcomm.c b/drivers/dma/bestcomm/bestcomm.c
> index 241a91936fe8..1006030ff167 100644
> --- a/drivers/dma/bestcomm/bestcomm.c
> +++ b/drivers/dma/bestcomm/bestcomm.c
> @@ -99,17 +102,12 @@ bcom_task_alloc(int bd_count, int bd_size, int priv_size)
>   
>   	return tsk;
>   
> -error:
> -	if (tsk) {
> -		if (tsk->irq)
> -			irq_dispose_mapping(tsk->irq);
> -		bcom_sram_free(tsk->bd);
> -		kfree(tsk->cookie);
> -		kfree(tsk);
> -	}
> -
> +err3:
> +	kfree(tsk->cookie);
> +err2:
> +	kfree(tsk);
> +err1:
>   	bcom_eng->tdt[tasknum].stop = 0;
> -

This blank line removal is unnecessary.

>   	return NULL;
>   }
>   EXPORT_SYMBOL_GPL(bcom_task_alloc);

      reply	other threads:[~2026-09-18  6:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18  0:18 Rosen Penev
2026-09-18  6:17 ` Christophe Leroy (CS GROUP) [this message]

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=5b086e1a-8b8c-4536-8b64-e0169826ab33@kernel.org \
    --to=chleroy@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rosenp@gmail.com \
    --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®