linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: "Geert Uytterhoeven" <geert+renesas@glider.be>,
	linux-arm-msm@vger.kernel.org, "Brian Xu" <brian.xu@amd.com>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"Biju Das" <biju.das.jz@bp.renesas.com>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Laxman Dewangan" <ldewangan@nvidia.com>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Radhey Shyam Pandey" <radhey.shyam.pandey@amd.com>,
	"Stefan Roese" <sr@denx.de>, "Fabio Estevam" <festevam@gmail.com>,
	"Swati Agarwal" <swati.agarwal@amd.com>,
	"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
	"Rob Herring" <robh@kernel.org>,
	"Peter Korsgaard" <peter@korsgaard.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Samuel Holland" <samuel@sholland.org>,
	"Green Wan" <green.wan@sifive.com>,
	"Viresh Kumar" <vireshk@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Sinan Kaya" <okaya@kernel.org>,
	"Ludovic Desroches" <ludovic.desroches@microchip.com>
Subject: Re: [PATCH 00/59] dma: Convert to platform remove callback returning void
Date: Thu, 28 Sep 2023 13:19:13 +0530	[thread overview]
Message-ID: <ZRUv+WgkovPotwIr@matsya> (raw)
In-Reply-To: <20230919133207.1400430-1-u.kleine-koenig@pengutronix.de>

On 19-09-23, 15:31, Uwe Kleine-König wrote:
> Hello,
> 
> this series convert nearly all platform drivers below drivers/dma to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.

I have applied this, with change of subsystem to dmaengine: xxx
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> There are 4 drivers I didn't convert in this series:
> 
> 	drivers/dma/milbeaut-hdmac.c
> 	drivers/dma/milbeaut-xdmac.c
> 	drivers/dma/uniphier-mdmac.c
> 	drivers/dma/uniphier-xdmac.c
> 
> These all might return early in .remove() if dmaengine_terminate_sync()
> fails. I only looked deeper into the first one, and this shows exactly
> the error that is easy to make with .remove() returning an int: When
> returning early from .remove(), some cleanup (here:
> dma_async_device_unregister()) is skipped. So the dma device stays
> known, but the device is still unregistered and the devm allocated stuff
> (here e.g. *mdev) is freed. So it can probably easily happen, that
> something tries to use the dma device and this will likely result in an
> oops.

We should convert these too, thanks for your work for the conversion

-- 
~Vinod

      parent reply	other threads:[~2023-09-28 10:23 UTC|newest]

Thread overview: 4+ 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 15/59] dma: fsldma: " Uwe Kleine-König
2023-09-28  7:46 ` [PATCH 00/59] dma: " Vinod Koul
2023-09-28  7:49 ` Vinod Koul [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=ZRUv+WgkovPotwIr@matsya \
    --to=vkoul@kernel.org \
    --cc=alyssa@rosenzweig.io \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=brian.xu@amd.com \
    --cc=festevam@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=geert+renesas@glider.be \
    --cc=green.wan@sifive.com \
    --cc=gustavoars@kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=lars@metafoo.de \
    --cc=ldewangan@nvidia.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=mani@kernel.org \
    --cc=okaya@kernel.org \
    --cc=paul@crapouillou.net \
    --cc=peter@korsgaard.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=sr@denx.de \
    --cc=swati.agarwal@amd.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vireshk@kernel.org \
    --cc=wens@csie.org \
    --cc=zhang.lyra@gmail.com \
    /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).