dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olivier Dautricourt <olivierdautricourt@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Vinod Koul <vkoul@kernel.org>, Stefan Roese <sr@denx.de>,
	dmaengine@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH 01/59] dma: altera-msgdma: Convert to platform remove callback returning void
Date: Wed, 20 Sep 2023 20:13:05 +0200	[thread overview]
Message-ID: <ZQs2MQPhgGU3qrRw@freebase> (raw)
In-Reply-To: <20230919133207.1400430-2-u.kleine-koenig@pengutronix.de>

On Tue, Sep 19, 2023 at 03:31:09PM +0200, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is ignored (apart
> from emitting a warning) and this typically results in resource leaks.
> To improve here there is a quest to make the remove callback return
> void. In the first step of this quest all drivers are converted to
> .remove_new() which already returns void. Eventually after all drivers
> are converted, .remove_new() is renamed to .remove().
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.

Acked-by: Olivier Dautricourt <olivierdautricourt@gmail.com>

Thanks

> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/dma/altera-msgdma.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/altera-msgdma.c b/drivers/dma/altera-msgdma.c
> index 4153c2edb049..a8e3615235b8 100644
> --- a/drivers/dma/altera-msgdma.c
> +++ b/drivers/dma/altera-msgdma.c
> @@ -923,7 +923,7 @@ static int msgdma_probe(struct platform_device *pdev)
>   *
>   * Return: Always '0'
>   */
> -static int msgdma_remove(struct platform_device *pdev)
> +static void msgdma_remove(struct platform_device *pdev)
>  {
>  	struct msgdma_device *mdev = platform_get_drvdata(pdev);
>  
> @@ -933,8 +933,6 @@ static int msgdma_remove(struct platform_device *pdev)
>  	msgdma_dev_remove(mdev);
>  
>  	dev_notice(&pdev->dev, "Altera mSGDMA driver removed\n");
> -
> -	return 0;
>  }
>  
>  #ifdef CONFIG_OF
> @@ -952,7 +950,7 @@ static struct platform_driver msgdma_driver = {
>  		.of_match_table = of_match_ptr(msgdma_match),
>  	},
>  	.probe = msgdma_probe,
> -	.remove = msgdma_remove,
> +	.remove_new = msgdma_remove,
>  };
>  
>  module_platform_driver(msgdma_driver);
> -- 
> 2.40.1
> 

  reply	other threads:[~2023-09-20 18:13 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19 13:31 [PATCH 00/59] dma: Convert to platform remove callback returning void Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 01/59] dma: altera-msgdma: " Uwe Kleine-König
2023-09-20 18:13   ` Olivier Dautricourt [this message]
2023-09-19 13:31 ` [PATCH 02/59] dma: apple-admac: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 03/59] dma: at_hdmac: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 04/59] dma: at_xdmac: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 05/59] dma: bcm-sba-raid: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 06/59] dma: bcm2835-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 07/59] dma: bestcomm: bestcomm: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 08/59] dma: dma-axi-dmac: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 09/59] dma: dma-jz4780: " Uwe Kleine-König
2023-09-19 13:39   ` Paul Cercueil
2023-09-19 14:48     ` Uwe Kleine-König
2023-09-20 15:44   ` Philippe Mathieu-Daudé
2023-09-19 13:31 ` [PATCH 10/59] dma: dw-axi-dmac: dw-axi-dmac-platform: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 11/59] dma: dw: platform: " Uwe Kleine-König
2023-09-28  7:09   ` Viresh Kumar
2023-09-19 13:31 ` [PATCH 12/59] dma: fsl-edma-main: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 13/59] dma: fsl-qdma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 14/59] dma: fsl_raid: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 15/59] dma: fsldma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 16/59] dma: idma64: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 17/59] dma: img-mdc-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 18/59] dma: imx-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 19/59] dma: imx-sdma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 20/59] dma: k3dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 21/59] dma: mcf-edma-main: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 22/59] dma: mediatek: mtk-cqdma: " Uwe Kleine-König
2023-09-20 10:28   ` AngeloGioacchino Del Regno
2023-09-19 13:31 ` [PATCH 23/59] dma: mediatek: mtk-hsdma: " Uwe Kleine-König
2023-09-20 10:28   ` AngeloGioacchino Del Regno
2023-09-19 13:31 ` [PATCH 24/59] dma: mediatek: mtk-uart-apdma: " Uwe Kleine-König
2023-09-20 10:28   ` AngeloGioacchino Del Regno
2023-09-19 13:31 ` [PATCH 25/59] dma: mmp_pdma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 26/59] dma: mmp_tdma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 27/59] dma: moxart-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 28/59] dma: mpc512x_dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 29/59] dma: mv_xor_v2: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 30/59] dma: nbpfaxi: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 31/59] dma: owl-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 32/59] dma: ppc4xx: adma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 33/59] dma: pxa_dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 34/59] dma: qcom: bam_dma: " Uwe Kleine-König
2023-09-19 21:02   ` Konrad Dybcio
2023-09-19 13:31 ` [PATCH 35/59] dma: qcom: hidma: " Uwe Kleine-König
2023-09-19 21:02   ` Konrad Dybcio
2023-09-19 13:31 ` [PATCH 36/59] dma: qcom: qcom_adm: " Uwe Kleine-König
2023-09-19 21:02   ` Konrad Dybcio
2023-09-19 13:31 ` [PATCH 37/59] dma: sa11x0-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 38/59] dma: sf-pdma: sf-pdma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 39/59] dma: sh: rcar-dmac: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 40/59] dma: sh: rz-dmac: " Uwe Kleine-König
2023-09-19 13:35   ` Geert Uytterhoeven
2023-09-19 13:31 ` [PATCH 41/59] dma: sh: shdmac: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 42/59] dma: sh: usb-dmac: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 43/59] dma: sprd-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 44/59] dma: st_fdma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 45/59] dma: sun4i-dma: " Uwe Kleine-König
2023-09-19 17:21   ` Jernej Škrabec
2023-09-19 13:31 ` [PATCH 46/59] dma: sun6i-dma: " Uwe Kleine-König
2023-09-19 17:22   ` Jernej Škrabec
2023-09-19 13:31 ` [PATCH 47/59] dma: tegra186-gpc-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 48/59] dma: tegra20-apb-dma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 49/59] dma: tegra210-adma: " Uwe Kleine-König
2023-09-19 13:31 ` [PATCH 50/59] dma: ti: cppi41: " Uwe Kleine-König
2023-09-20 17:55   ` Péter Ujfalusi
2023-09-19 13:31 ` [PATCH 51/59] dma: ti: edma: " Uwe Kleine-König
2023-09-20 17:54   ` Péter Ujfalusi
2023-09-19 13:32 ` [PATCH 52/59] dma: ti: omap-dma: " Uwe Kleine-König
2023-09-20 17:54   ` Péter Ujfalusi
2023-09-19 13:32 ` [PATCH 53/59] dma: timb_dma: " Uwe Kleine-König
2023-09-19 13:32 ` [PATCH 54/59] dma: txx9dmac: " Uwe Kleine-König
2023-09-19 13:32 ` [PATCH 55/59] dma: xgene-dma: " Uwe Kleine-König
2023-09-19 13:32 ` [PATCH 56/59] dma: xilinx: xdma: " Uwe Kleine-König
2023-09-19 13:32 ` [PATCH 57/59] dma: xilinx: xilinx_dma: " Uwe Kleine-König
2023-09-22 11:36   ` Pandey, Radhey Shyam
2023-09-28  7:27     ` Uwe Kleine-König
2023-09-28  7:47       ` Vinod Koul
2023-09-19 13:32 ` [PATCH 58/59] dma: xilinx: xilinx_dpdma: " Uwe Kleine-König
2023-09-19 13:32 ` [PATCH 59/59] dma: xilinx: zynqmp_dma: " Uwe Kleine-König
2023-09-28  7:46 ` [PATCH 00/59] dma: " Vinod Koul
2023-09-28  7:49 ` 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=ZQs2MQPhgGU3qrRw@freebase \
    --to=olivierdautricourt@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=sr@denx.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).