asahi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: "Olivier Dautricourt" <olivierdautricourt@gmail.com>,
	"Stefan Roese" <sr@denx.de>,
	dmaengine@vger.kernel.org, kernel@pengutronix.de,
	"Hector Martin" <marcan@marcan.st>,
	"Sven Peter" <sven@svenpeter.dev>,
	"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
	asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	"Ludovic Desroches" <ludovic.desroches@microchip.com>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	linux-rpi-kernel@lists.infradead.org,
	"Rob Herring" <robh@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Paul Cercueil" <paul@crapouillou.net>,
	linux-mips@vger.kernel.org,
	"Eugeniy Paltsev" <Eugeniy.Paltsev@synopsys.com>,
	"Viresh Kumar" <vireshk@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Li Yang" <leoyang.li@nxp.com>, "Zhang Wei" <zw@zh-kernel.org>,
	linuxppc-dev@lists.ozlabs.org, "Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	linux-mediatek@lists.infradead.org,
	"Andreas Färber" <afaerber@suse.de>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	linux-actions@lists.infradead.org,
	"ye xingchen" <ye.xingchen@zte.com.cn>,
	"Daniel Mack" <daniel@zonque.org>,
	"Haojian Zhuang" <haojian.zhuang@gmail.com>,
	"Robert Jarzmik" <robert.jarzmik@free.fr>,
	"Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	linux-arm-msm@vger.kernel.org, "Sinan Kaya" <okaya@kernel.org>,
	"Green Wan" <green.wan@sifive.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"Biju Das" <biju.das.jz@bp.renesas.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"Pavel Machek" <pavel@denx.de>,
	"Hien Huynh" <hien.huynh.px@renesas.com>,
	"Yangtao Li" <frank.li@vivo.com>,
	"Peter Ujfalusi" <peter.ujfalusi@gmail.com>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Orson Zhai" <orsonzhai@gmail.com>,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	"Patrice Chotard" <patrice.chotard@foss.st.com>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Samuel Holland" <samuel@sholland.org>,
	linux-sunxi@lists.linux.dev,
	"Laxman Dewangan" <ldewangan@nvidia.com>,
	"Jon Hunter" <jonathanh@nvidia.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	linux-tegra@vger.kernel.org, "Lizhi Hou" <lizhi.hou@amd.com>,
	"Brian Xu" <brian.xu@amd.com>,
	"Raj Kumar Rampelli" <raj.kumar.rampelli@amd.com>,
	"Michal Simek" <michal.simek@amd.com>,
	"Radhey Shyam Pandey" <radhey.shyam.pandey@amd.com>,
	"Peter Korsgaard" <peter@korsgaard.com>,
	"Liu Shixin" <liushixin2@huawei.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Harini Katakam" <harini.katakam@amd.com>,
	"Swati Agarwal" <swati.agarwal@amd.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  7:49 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 02/59] dma: apple-admac: " 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=Eugeniy.Paltsev@synopsys.com \
    --cc=afaerber@suse.de \
    --cc=agross@kernel.org \
    --cc=alyssa@rosenzweig.io \
    --cc=andersson@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=asahi@lists.linux.dev \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=brian.xu@amd.com \
    --cc=daniel@zonque.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=frank.li@vivo.com \
    --cc=geert+renesas@glider.be \
    --cc=green.wan@sifive.com \
    --cc=gustavoars@kernel.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=harini.katakam@amd.com \
    --cc=hien.huynh.px@renesas.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=keescook@chromium.org \
    --cc=kernel@pengutronix.de \
    --cc=konrad.dybcio@linaro.org \
    --cc=lars@metafoo.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=ldewangan@nvidia.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=liushixin2@huawei.com \
    --cc=lizhi.hou@amd.com \
    --cc=ludovic.desroches@microchip.com \
    --cc=mani@kernel.org \
    --cc=marcan@marcan.st \
    --cc=matthias.bgg@gmail.com \
    --cc=michal.simek@amd.com \
    --cc=okaya@kernel.org \
    --cc=olivierdautricourt@gmail.com \
    --cc=orsonzhai@gmail.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=paul@crapouillou.net \
    --cc=pavel@denx.de \
    --cc=peter.ujfalusi@gmail.com \
    --cc=peter@korsgaard.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=raj.kumar.rampelli@amd.com \
    --cc=rjui@broadcom.com \
    --cc=robert.jarzmik@free.fr \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=samuel@sholland.org \
    --cc=sbranden@broadcom.com \
    --cc=sean.wang@mediatek.com \
    --cc=shawnguo@kernel.org \
    --cc=sr@denx.de \
    --cc=sven@svenpeter.dev \
    --cc=swati.agarwal@amd.com \
    --cc=thierry.reding@gmail.com \
    --cc=tudor.ambarus@linaro.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vireshk@kernel.org \
    --cc=wens@csie.org \
    --cc=ye.xingchen@zte.com.cn \
    --cc=zhang.lyra@gmail.com \
    --cc=zw@zh-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 read-only IMAP folder(s) and NNTP newsgroup(s).