* [PATCH 0/7] ASoc: Another series to convert to struct platform_driver:remove_new()
@ 2023-10-13 22:19 Uwe Kleine-König
2023-10-13 22:19 ` [PATCH 5/7] ASoC: meson: Make meson_card_remove() return void Uwe Kleine-König
2023-10-24 13:54 ` [PATCH 0/7] ASoc: Another series to convert to struct platform_driver:remove_new() Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2023-10-13 22:19 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Nicolas Frattaroli, Jaroslav Kysela, Takashi Iwai,
Heiko Stuebner, linux-rockchip, alsa-devel, linux-arm-kernel,
kernel, James Schulman, David Rhodes, Richard Fitzgerald,
patches, Hal Feng, Xingyu Wu, Thierry Reding, Jonathan Hunter,
Kuninori Morimoto, Rob Herring, AngeloGioacchino Del Regno,
Wang Yufen, Aidan MacDonald, Jernej Skrabec, Claudiu Beznea,
Astrid Rost, Robert Hancock, Herve Codina, Sameer Pujar,
linux-tegra, Jerome Brunet, Neil Armstrong, Kevin Hilman,
Martin Blumenstingl, linux-amlogic, Srinivas Kandagatla,
Banajit Goswami, Kunihiko Hayashi, Masami Hiramatsu
Hello,
this is another series to convert ASoC drivers to use struct
platform_driver:remove_new(). The rockchip one was already send before
but with a wrong subject prefix, the cs42l43 driver is newer than the
last series. The remaining five patches are for driver combos that my
coccinelle patch failed to detect before.
Best regards
Uwe
Uwe Kleine-König (7):
ASoC: rockchip: i2s_tdm: Convert to platform remove callback returning
void
ASoC: cs42l43: Convert to platform remove callback returning void
ASoC: starfive/jh7110-pwmdac: Convert to platform remove callback
returning void
ASoC: simple-card-utils: Make simple_util_remove() return void
ASoC: meson: Make meson_card_remove() return void
ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return
void
ASoC: uniphier: Make uniphier_aio_remove() return void
include/sound/simple_card_utils.h | 2 +-
sound/soc/codecs/cs42l43.c | 6 ++----
sound/soc/generic/audio-graph-card.c | 2 +-
sound/soc/generic/audio-graph-card2-custom-sample.c | 2 +-
sound/soc/generic/audio-graph-card2.c | 2 +-
sound/soc/generic/simple-card-utils.c | 4 +---
sound/soc/generic/simple-card.c | 2 +-
sound/soc/meson/axg-card.c | 2 +-
sound/soc/meson/gx-card.c | 2 +-
sound/soc/meson/meson-card-utils.c | 4 +---
sound/soc/meson/meson-card.h | 2 +-
sound/soc/qcom/lpass-apq8016.c | 2 +-
sound/soc/qcom/lpass-cpu.c | 5 +----
sound/soc/qcom/lpass-ipq806x.c | 2 +-
sound/soc/qcom/lpass-sc7180.c | 2 +-
sound/soc/qcom/lpass-sc7280.c | 2 +-
sound/soc/qcom/lpass.h | 2 +-
sound/soc/rockchip/rockchip_i2s_tdm.c | 6 ++----
sound/soc/starfive/jh7110_pwmdac.c | 5 ++---
sound/soc/tegra/tegra_audio_graph_card.c | 2 +-
sound/soc/uniphier/aio-cpu.c | 4 +---
sound/soc/uniphier/aio-ld11.c | 2 +-
sound/soc/uniphier/aio-pxs2.c | 2 +-
sound/soc/uniphier/aio.h | 2 +-
24 files changed, 27 insertions(+), 41 deletions(-)
base-commit: e3b18f7200f45d66f7141136c25554ac1e82009b
--
2.42.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 5/7] ASoC: meson: Make meson_card_remove() return void
2023-10-13 22:19 [PATCH 0/7] ASoc: Another series to convert to struct platform_driver:remove_new() Uwe Kleine-König
@ 2023-10-13 22:19 ` Uwe Kleine-König
2023-10-17 14:40 ` Jerome Brunet
2023-10-24 13:54 ` [PATCH 0/7] ASoc: Another series to convert to struct platform_driver:remove_new() Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2023-10-13 22:19 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Jerome Brunet, Jaroslav Kysela, Takashi Iwai, Neil Armstrong,
Kevin Hilman, Martin Blumenstingl, alsa-devel, linux-arm-kernel,
linux-amlogic, kernel
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 (mostly) ignored
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.
meson_card_remove() returned zero unconditionally. Make it return void
instead and convert all users to struct platform_device::remove_new().
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
sound/soc/meson/axg-card.c | 2 +-
sound/soc/meson/gx-card.c | 2 +-
sound/soc/meson/meson-card-utils.c | 4 +---
sound/soc/meson/meson-card.h | 2 +-
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c
index 18b16274449e..3180aa4d3a15 100644
--- a/sound/soc/meson/axg-card.c
+++ b/sound/soc/meson/axg-card.c
@@ -360,7 +360,7 @@ MODULE_DEVICE_TABLE(of, axg_card_of_match);
static struct platform_driver axg_card_pdrv = {
.probe = meson_card_probe,
- .remove = meson_card_remove,
+ .remove_new = meson_card_remove,
.driver = {
.name = "axg-sound-card",
.of_match_table = axg_card_of_match,
diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c
index 01beac1d927f..f1539e542638 100644
--- a/sound/soc/meson/gx-card.c
+++ b/sound/soc/meson/gx-card.c
@@ -130,7 +130,7 @@ MODULE_DEVICE_TABLE(of, gx_card_of_match);
static struct platform_driver gx_card_pdrv = {
.probe = meson_card_probe,
- .remove = meson_card_remove,
+ .remove_new = meson_card_remove,
.driver = {
.name = "gx-sound-card",
.of_match_table = gx_card_of_match,
diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c
index c81099218597..ed6c7e2f609c 100644
--- a/sound/soc/meson/meson-card-utils.c
+++ b/sound/soc/meson/meson-card-utils.c
@@ -327,13 +327,11 @@ int meson_card_probe(struct platform_device *pdev)
}
EXPORT_SYMBOL_GPL(meson_card_probe);
-int meson_card_remove(struct platform_device *pdev)
+void meson_card_remove(struct platform_device *pdev)
{
struct meson_card *priv = platform_get_drvdata(pdev);
meson_card_clean_references(priv);
-
- return 0;
}
EXPORT_SYMBOL_GPL(meson_card_remove);
diff --git a/sound/soc/meson/meson-card.h b/sound/soc/meson/meson-card.h
index a5374324a189..a0d693e4f460 100644
--- a/sound/soc/meson/meson-card.h
+++ b/sound/soc/meson/meson-card.h
@@ -49,6 +49,6 @@ int meson_card_set_fe_link(struct snd_soc_card *card,
bool is_playback);
int meson_card_probe(struct platform_device *pdev);
-int meson_card_remove(struct platform_device *pdev);
+void meson_card_remove(struct platform_device *pdev);
#endif /* _MESON_SND_CARD_H */
--
2.42.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 5/7] ASoC: meson: Make meson_card_remove() return void
2023-10-13 22:19 ` [PATCH 5/7] ASoC: meson: Make meson_card_remove() return void Uwe Kleine-König
@ 2023-10-17 14:40 ` Jerome Brunet
0 siblings, 0 replies; 4+ messages in thread
From: Jerome Brunet @ 2023-10-17 14:40 UTC (permalink / raw)
To: Uwe Kleine-König, Liam Girdwood, Mark Brown
Cc: Jaroslav Kysela, Takashi Iwai, Neil Armstrong, Kevin Hilman,
Martin Blumenstingl, alsa-devel, linux-arm-kernel, linux-amlogic,
kernel
On Sat 14 Oct 2023 at 00:19, 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 (mostly) ignored
> 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.
>
> meson_card_remove() returned zero unconditionally. Make it return void
> instead and convert all users to struct platform_device::remove_new().
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
> sound/soc/meson/axg-card.c | 2 +-
> sound/soc/meson/gx-card.c | 2 +-
> sound/soc/meson/meson-card-utils.c | 4 +---
> sound/soc/meson/meson-card.h | 2 +-
> 4 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c
> index 18b16274449e..3180aa4d3a15 100644
> --- a/sound/soc/meson/axg-card.c
> +++ b/sound/soc/meson/axg-card.c
> @@ -360,7 +360,7 @@ MODULE_DEVICE_TABLE(of, axg_card_of_match);
>
> static struct platform_driver axg_card_pdrv = {
> .probe = meson_card_probe,
> - .remove = meson_card_remove,
> + .remove_new = meson_card_remove,
> .driver = {
> .name = "axg-sound-card",
> .of_match_table = axg_card_of_match,
> diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c
> index 01beac1d927f..f1539e542638 100644
> --- a/sound/soc/meson/gx-card.c
> +++ b/sound/soc/meson/gx-card.c
> @@ -130,7 +130,7 @@ MODULE_DEVICE_TABLE(of, gx_card_of_match);
>
> static struct platform_driver gx_card_pdrv = {
> .probe = meson_card_probe,
> - .remove = meson_card_remove,
> + .remove_new = meson_card_remove,
> .driver = {
> .name = "gx-sound-card",
> .of_match_table = gx_card_of_match,
> diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c
> index c81099218597..ed6c7e2f609c 100644
> --- a/sound/soc/meson/meson-card-utils.c
> +++ b/sound/soc/meson/meson-card-utils.c
> @@ -327,13 +327,11 @@ int meson_card_probe(struct platform_device *pdev)
> }
> EXPORT_SYMBOL_GPL(meson_card_probe);
>
> -int meson_card_remove(struct platform_device *pdev)
> +void meson_card_remove(struct platform_device *pdev)
> {
> struct meson_card *priv = platform_get_drvdata(pdev);
>
> meson_card_clean_references(priv);
> -
> - return 0;
> }
> EXPORT_SYMBOL_GPL(meson_card_remove);
>
> diff --git a/sound/soc/meson/meson-card.h b/sound/soc/meson/meson-card.h
> index a5374324a189..a0d693e4f460 100644
> --- a/sound/soc/meson/meson-card.h
> +++ b/sound/soc/meson/meson-card.h
> @@ -49,6 +49,6 @@ int meson_card_set_fe_link(struct snd_soc_card *card,
> bool is_playback);
>
> int meson_card_probe(struct platform_device *pdev);
> -int meson_card_remove(struct platform_device *pdev);
> +void meson_card_remove(struct platform_device *pdev);
>
> #endif /* _MESON_SND_CARD_H */
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/7] ASoc: Another series to convert to struct platform_driver:remove_new()
2023-10-13 22:19 [PATCH 0/7] ASoc: Another series to convert to struct platform_driver:remove_new() Uwe Kleine-König
2023-10-13 22:19 ` [PATCH 5/7] ASoC: meson: Make meson_card_remove() return void Uwe Kleine-König
@ 2023-10-24 13:54 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2023-10-24 13:54 UTC (permalink / raw)
To: Liam Girdwood, Uwe Kleine-König
Cc: Nicolas Frattaroli, Jaroslav Kysela, Takashi Iwai,
Heiko Stuebner, linux-rockchip, alsa-devel, linux-arm-kernel,
kernel, James Schulman, David Rhodes, Richard Fitzgerald,
patches, Hal Feng, Xingyu Wu, Thierry Reding, Jonathan Hunter,
Kuninori Morimoto, Rob Herring, AngeloGioacchino Del Regno,
Wang Yufen, Aidan MacDonald, Jernej Skrabec, Claudiu Beznea,
Astrid Rost, Robert Hancock, Herve Codina, Sameer Pujar,
linux-tegra, Jerome Brunet, Neil Armstrong, Kevin Hilman,
Martin Blumenstingl, linux-amlogic, Srinivas Kandagatla,
Banajit Goswami, Kunihiko Hayashi, Masami Hiramatsu
On Sat, 14 Oct 2023 00:19:46 +0200, Uwe Kleine-König wrote:
> this is another series to convert ASoC drivers to use struct
> platform_driver:remove_new(). The rockchip one was already send before
> but with a wrong subject prefix, the cs42l43 driver is newer than the
> last series. The remaining five patches are for driver combos that my
> coccinelle patch failed to detect before.
>
> Best regards
> Uwe
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/7] ASoC: rockchip: i2s_tdm: Convert to platform remove callback returning void
commit: 46dd58bef32dea55b663141858ca1659a85a1505
[2/7] ASoC: cs42l43: Convert to platform remove callback returning void
commit: 491a1132f5cb77c8f1abb44d9928f8f184fc3df7
[3/7] ASoC: starfive/jh7110-pwmdac: Convert to platform remove callback returning void
commit: 6b02f5a6f1853c6d5f73b000afbc177f5ee59d9e
[4/7] ASoC: simple-card-utils: Make simple_util_remove() return void
commit: 393df6f321c757d164fa412b7eae527a8e2acb75
[5/7] ASoC: meson: Make meson_card_remove() return void
commit: 8210f496c3e12410fa240c7fbc63f71ef78e253f
[6/7] ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void
commit: d0cc676c426d1958989fac2a0d45179fb9992f0a
[7/7] ASoC: uniphier: Make uniphier_aio_remove() return void
commit: 7242265213893e053457240f833d06ecd75b7ab3
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-24 13:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-13 22:19 [PATCH 0/7] ASoc: Another series to convert to struct platform_driver:remove_new() Uwe Kleine-König
2023-10-13 22:19 ` [PATCH 5/7] ASoC: meson: Make meson_card_remove() return void Uwe Kleine-König
2023-10-17 14:40 ` Jerome Brunet
2023-10-24 13:54 ` [PATCH 0/7] ASoc: Another series to convert to struct platform_driver:remove_new() Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®