All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Andrew Davis <afd@ti.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-remoteproc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 9/9] remoteproc: stm32: Use devm_rproc_alloc() helper
Date: Fri, 2 Feb 2024 11:41:19 -0700	[thread overview]
Message-ID: <Zb03T2Ti2v70NUMu@p14s> (raw)
In-Reply-To: <20240123184632.725054-9-afd@ti.com>

On Tue, Jan 23, 2024 at 12:46:32PM -0600, Andrew Davis wrote:
> Use the device lifecycle managed allocation function. This helps prevent
> mistakes like freeing out of order in cleanup functions and forgetting to
> free on error paths.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  drivers/remoteproc/stm32_rproc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
> index 4f469f0bcf8b2..fed0866de1819 100644
> --- a/drivers/remoteproc/stm32_rproc.c
> +++ b/drivers/remoteproc/stm32_rproc.c
> @@ -843,7 +843,7 @@ static int stm32_rproc_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	rproc = rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata));
> +	rproc = devm_rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata));
>  	if (!rproc)
>  		return -ENOMEM;
>  
> @@ -897,7 +897,6 @@ static int stm32_rproc_probe(struct platform_device *pdev)
>  		dev_pm_clear_wake_irq(dev);
>  		device_init_wakeup(dev, false);
>  	}
> -	rproc_free(rproc);
>  	return ret;
>  }
>  
> @@ -918,7 +917,6 @@ static void stm32_rproc_remove(struct platform_device *pdev)
>  		dev_pm_clear_wake_irq(dev);
>  		device_init_wakeup(dev, false);
>  	}
> -	rproc_free(rproc);
>  }

I have applied patches 1, 2, 8 and 9 of this set.  Bjorn handles the QCOM
peripherals and will take care of the remaining ones.

Thanks,
Mathieu

>  
>  static int stm32_rproc_suspend(struct device *dev)
> -- 
> 2.39.2
> 

WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Andrew Davis <afd@ti.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-remoteproc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 9/9] remoteproc: stm32: Use devm_rproc_alloc() helper
Date: Fri, 2 Feb 2024 11:41:19 -0700	[thread overview]
Message-ID: <Zb03T2Ti2v70NUMu@p14s> (raw)
In-Reply-To: <20240123184632.725054-9-afd@ti.com>

On Tue, Jan 23, 2024 at 12:46:32PM -0600, Andrew Davis wrote:
> Use the device lifecycle managed allocation function. This helps prevent
> mistakes like freeing out of order in cleanup functions and forgetting to
> free on error paths.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  drivers/remoteproc/stm32_rproc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
> index 4f469f0bcf8b2..fed0866de1819 100644
> --- a/drivers/remoteproc/stm32_rproc.c
> +++ b/drivers/remoteproc/stm32_rproc.c
> @@ -843,7 +843,7 @@ static int stm32_rproc_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	rproc = rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata));
> +	rproc = devm_rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata));
>  	if (!rproc)
>  		return -ENOMEM;
>  
> @@ -897,7 +897,6 @@ static int stm32_rproc_probe(struct platform_device *pdev)
>  		dev_pm_clear_wake_irq(dev);
>  		device_init_wakeup(dev, false);
>  	}
> -	rproc_free(rproc);
>  	return ret;
>  }
>  
> @@ -918,7 +917,6 @@ static void stm32_rproc_remove(struct platform_device *pdev)
>  		dev_pm_clear_wake_irq(dev);
>  		device_init_wakeup(dev, false);
>  	}
> -	rproc_free(rproc);
>  }

I have applied patches 1, 2, 8 and 9 of this set.  Bjorn handles the QCOM
peripherals and will take care of the remaining ones.

Thanks,
Mathieu

>  
>  static int stm32_rproc_suspend(struct device *dev)
> -- 
> 2.39.2
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-02-02 18:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 18:46 [PATCH 1/9] remoteproc: imx_dsp_rproc: Use devm_rproc_alloc() helper Andrew Davis
2024-01-23 18:46 ` Andrew Davis
2024-01-23 18:46 ` [PATCH 2/9] remoteproc: imx_rproc: " Andrew Davis
2024-01-23 18:46   ` Andrew Davis
2024-01-24 22:12   ` Iuliana Prodan
2024-01-24 22:12     ` Iuliana Prodan
2024-01-23 18:46 ` [PATCH 3/9] remoteproc: qcom_q6v5_adsp: " Andrew Davis
2024-01-23 18:46   ` Andrew Davis
2024-01-23 18:46 ` [PATCH 4/9] remoteproc: qcom_q6v5_mss: " Andrew Davis
2024-01-23 18:46   ` Andrew Davis
2024-01-23 18:46 ` [PATCH 5/9] remoteproc: qcom_q6v5_pas: " Andrew Davis
2024-01-23 18:46   ` Andrew Davis
2024-01-23 18:46 ` [PATCH 6/9] remoteproc: qcom_q6v5_wcss: " Andrew Davis
2024-01-23 18:46   ` Andrew Davis
2024-02-02 20:51   ` Unnathi Chalicheemala
2024-02-02 20:51     ` Unnathi Chalicheemala
2024-02-02 21:14     ` Andrew Davis
2024-02-02 21:14       ` Andrew Davis
2024-02-02 21:37       ` Unnathi Chalicheemala
2024-02-02 21:37         ` Unnathi Chalicheemala
2024-01-23 18:46 ` [PATCH 7/9] remoteproc: qcom_wcnss: " Andrew Davis
2024-01-23 18:46   ` Andrew Davis
2024-01-23 18:46 ` [PATCH 8/9] remoteproc: st: " Andrew Davis
2024-01-23 18:46   ` Andrew Davis
2024-01-23 18:46 ` [PATCH 9/9] remoteproc: stm32: " Andrew Davis
2024-01-23 18:46   ` Andrew Davis
2024-02-02 18:41   ` Mathieu Poirier [this message]
2024-02-02 18:41     ` Mathieu Poirier
2024-01-24 22:11 ` [PATCH 1/9] remoteproc: imx_dsp_rproc: " Iuliana Prodan
2024-01-24 22:11   ` Iuliana Prodan

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=Zb03T2Ti2v70NUMu@p14s \
    --to=mathieu.poirier@linaro.org \
    --cc=afd@ti.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andersson@kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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.