From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Daniel Baluta" <daniel.baluta@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Mark Brown <broonie@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>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
sound-open-firmware@alsa-project.org,
alsa-devel@alsa-project.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] ASoC: SOF: Convert to platform remove callback returning void
Date: Tue, 10 Oct 2023 09:29:22 -0400 [thread overview]
Message-ID: <2bac708f-40f9-4f02-a3ff-d5ab11e7ebe2@linux.intel.com> (raw)
In-Reply-To: <CAEnQRZBzEfwC3kgaUWty769L4wD-LGng5yUJwQR2_C4T0oJjxA@mail.gmail.com>
On 10/10/23 07:00, Daniel Baluta wrote:
> On Mon, Oct 9, 2023 at 7:03 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> 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() will be renamed to .remove().
>>
>> The SOF platform drivers all use either sof_of_remove() or
>> sof_acpi_remove() which both return zero unconditionally. Change these
>> functions to return void and the drivers to use .remove_new(). There is
>> no semantical change.
>>
>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
>
>
> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
FWIW I have a follow-up patch to convert the SOF remove ops to return
void: https://github.com/thesofproject/linux/pull/4625
next prev parent reply other threads:[~2023-10-10 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 15:59 [PATCH] ASoC: SOF: Convert to platform remove callback returning void Uwe Kleine-König
2023-10-10 9:03 ` AngeloGioacchino Del Regno
2023-10-10 11:00 ` Daniel Baluta
2023-10-10 13:29 ` Pierre-Louis Bossart [this message]
2023-10-10 21:04 ` Mark Brown
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=2bac708f-40f9-4f02-a3ff-d5ab11e7ebe2@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@gmail.com \
--cc=daniel.baluta@nxp.com \
--cc=festevam@gmail.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=sound-open-firmware@alsa-project.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=yung-chuan.liao@linux.intel.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