diff mbox series

ASoC: sunxi: sun4i-codec: fill ASoC card owner

Message ID 20210331145915.12545-1-bage@linutronix.de (mailing list archive)
State New, archived
Headers show
Series ASoC: sunxi: sun4i-codec: fill ASoC card owner | expand

Commit Message

bage@linutronix.de March 31, 2021, 2:59 p.m. UTC
From: Bastian Germann <bage@linutronix.de>

card->owner is a required property and since commit 81033c6b584b ("ALSA:
core: Warn on empty module") a warning is issued if it is empty. Add it.
This fixes following warning observed on Lamobo R1:

WARNING: CPU: 1 PID: 190 at sound/core/init.c:207 snd_card_new+0x430/0x480 [snd]
Modules linked in: sun4i_codec(E+) sun4i_backend(E+) snd_soc_core(E) ...
CPU: 1 PID: 190 Comm: systemd-udevd Tainted: G         C  E     5.10.0-1-armmp #1 Debian 5.10.4-1
Hardware name: Allwinner sun7i (A20) Family
[<c0ce8544>] (dump_backtrace) from [<c0ce88f0>] (show_stack+0x20/0x24)
[<c0ce88d0>] (show_stack) from [<c0ceda20>] (dump_stack+0xc8/0xdc)
[<c0ced958>] (dump_stack) from [<c034d49c>] (__warn+0xfc/0x158)
[<c034d3a0>] (__warn) from [<c0ce966c>] (warn_slowpath_fmt+0x70/0xe4)
[<c0ce9600>] (warn_slowpath_fmt) from [<bf48f604>] (snd_card_new+0x430/0x480 [snd])
[<bf48f1d4>] (snd_card_new [snd]) from [<bf53340c>] (snd_soc_bind_card+0x3a8/0xa30 [snd_soc_core])
[<bf533064>] (snd_soc_bind_card [snd_soc_core]) from [<bf533b8c>] (snd_soc_register_card+0xf8/0x108 [snd_soc_core])
[<bf533a94>] (snd_soc_register_card [snd_soc_core]) from [<bf55b888>] (sun4i_codec_probe+0x224/0x45c [sun4i_codec])
[<bf55b664>] (sun4i_codec_probe [sun4i_codec]) from [<c09879b4>] (platform_drv_probe+0x58/0xa8)
[<c098795c>] (platform_drv_probe) from [<c0984dc8>] (really_probe+0x108/0x510)
[<c0984cc0>] (really_probe) from [<c0985674>] (driver_probe_device+0x100/0x1d0)
[<c0985574>] (driver_probe_device) from [<c0985a74>] (device_driver_attach+0xb8/0xc0)
[<c09859bc>] (device_driver_attach) from [<c0985b18>] (__driver_attach+0x9c/0x150)
[<c0985a7c>] (__driver_attach) from [<c09825c8>] (bus_for_each_dev+0x84/0xd0)
[<c0982544>] (bus_for_each_dev) from [<c09844bc>] (driver_attach+0x2c/0x30)
[<c0984490>] (driver_attach) from [<c0983e70>] (bus_add_driver+0x120/0x20c)
[<c0983d50>] (bus_add_driver) from [<c098670c>] (driver_register+0x98/0x128)
[<c0986674>] (driver_register) from [<c0987908>] (__platform_driver_register+0x50/0x58)
[<c09878b8>] (__platform_driver_register) from [<bf566024>] (sun4i_codec_driver_init+0x24/0x1000 [sun4i_codec])
[<bf566000>] (sun4i_codec_driver_init [sun4i_codec]) from [<c030293c>] (do_one_initcall+0x50/0x274)
[<c03028ec>] (do_one_initcall) from [<c040d45c>] (do_init_module+0x70/0x294)
[<c040d3ec>] (do_init_module) from [<c040f9f4>] (load_module+0x2258/0x263c)
[<c040d79c>] (load_module) from [<c04100c0>] (sys_finit_module+0xc8/0x12c)
[<c040fff8>] (sys_finit_module) from [<c03002a4>] (__sys_trace_return+0x0/0x1c)

Fixes: 45fb6b6f2aa3 ("ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs")
Related: commit 3c27ea23ffb4 ("ASoC: qcom: Set card->owner to avoid warnings")
Related: commit ec653df2a0cb ("drm/vc4/vc4_hdmi: fill ASoC card owner")
Cc: linux-arm-kernel@lists.infradead.org
Cc: alsa-devel@alsa-project.org
Signed-off-by: Bastian Germann <bage@linutronix.de>
---
 sound/soc/sunxi/sun4i-codec.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Mark Brown March 31, 2021, 3:06 p.m. UTC | #1
On Wed, Mar 31, 2021 at 04:59:15PM +0200, bage@linutronix.de wrote:
> From: Bastian Germann <bage@linutronix.de>
> 
> card->owner is a required property and since commit 81033c6b584b ("ALSA:
> core: Warn on empty module") a warning is issued if it is empty. Add it.
> This fixes following warning observed on Lamobo R1:
> 
> WARNING: CPU: 1 PID: 190 at sound/core/init.c:207 snd_card_new+0x430/0x480 [snd]
> Modules linked in: sun4i_codec(E+) sun4i_backend(E+) snd_soc_core(E) ...
> CPU: 1 PID: 190 Comm: systemd-udevd Tainted: G         C  E     5.10.0-1-armmp #1 Debian 5.10.4-1
> Hardware name: Allwinner sun7i (A20) Family
> [<c0ce8544>] (dump_backtrace) from [<c0ce88f0>] (show_stack+0x20/0x24)
> [<c0ce88d0>] (show_stack) from [<c0ceda20>] (dump_stack+0xc8/0xdc)
> [<c0ced958>] (dump_stack) from [<c034d49c>] (__warn+0xfc/0x158)
> [<c034d3a0>] (__warn) from [<c0ce966c>] (warn_slowpath_fmt+0x70/0xe4)

Please think hard before including complete backtraces in upstream
reports, they are very large and contain almost no useful information
relative to their size so often obscure the relevant content in your
message. If part of the backtrace is usefully illustrative (it often is
for search engines if nothing else) then it's usually better to pull out
the relevant sections.
Mark Brown April 1, 2021, 10:16 a.m. UTC | #2
On Wed, 31 Mar 2021 16:59:15 +0200, bage@linutronix.de wrote:
> card->owner is a required property and since commit 81033c6b584b ("ALSA:
> core: Warn on empty module") a warning is issued if it is empty. Add it.
> This fixes following warning observed on Lamobo R1:
> 
> WARNING: CPU: 1 PID: 190 at sound/core/init.c:207 snd_card_new+0x430/0x480 [snd]
> Modules linked in: sun4i_codec(E+) sun4i_backend(E+) snd_soc_core(E) ...
> CPU: 1 PID: 190 Comm: systemd-udevd Tainted: G         C  E     5.10.0-1-armmp #1 Debian 5.10.4-1
> Hardware name: Allwinner sun7i (A20) Family
> [<c0ce8544>] (dump_backtrace) from [<c0ce88f0>] (show_stack+0x20/0x24)
> [<c0ce88d0>] (show_stack) from [<c0ceda20>] (dump_stack+0xc8/0xdc)
> [<c0ced958>] (dump_stack) from [<c034d49c>] (__warn+0xfc/0x158)
> [<c034d3a0>] (__warn) from [<c0ce966c>] (warn_slowpath_fmt+0x70/0xe4)
> [<c0ce9600>] (warn_slowpath_fmt) from [<bf48f604>] (snd_card_new+0x430/0x480 [snd])
> [<bf48f1d4>] (snd_card_new [snd]) from [<bf53340c>] (snd_soc_bind_card+0x3a8/0xa30 [snd_soc_core])
> [<bf533064>] (snd_soc_bind_card [snd_soc_core]) from [<bf533b8c>] (snd_soc_register_card+0xf8/0x108 [snd_soc_core])
> [<bf533a94>] (snd_soc_register_card [snd_soc_core]) from [<bf55b888>] (sun4i_codec_probe+0x224/0x45c [sun4i_codec])
> [<bf55b664>] (sun4i_codec_probe [sun4i_codec]) from [<c09879b4>] (platform_drv_probe+0x58/0xa8)
> [<c098795c>] (platform_drv_probe) from [<c0984dc8>] (really_probe+0x108/0x510)
> [<c0984cc0>] (really_probe) from [<c0985674>] (driver_probe_device+0x100/0x1d0)
> [<c0985574>] (driver_probe_device) from [<c0985a74>] (device_driver_attach+0xb8/0xc0)
> [<c09859bc>] (device_driver_attach) from [<c0985b18>] (__driver_attach+0x9c/0x150)
> [<c0985a7c>] (__driver_attach) from [<c09825c8>] (bus_for_each_dev+0x84/0xd0)
> [<c0982544>] (bus_for_each_dev) from [<c09844bc>] (driver_attach+0x2c/0x30)
> [<c0984490>] (driver_attach) from [<c0983e70>] (bus_add_driver+0x120/0x20c)
> [<c0983d50>] (bus_add_driver) from [<c098670c>] (driver_register+0x98/0x128)
> [<c0986674>] (driver_register) from [<c0987908>] (__platform_driver_register+0x50/0x58)
> [<c09878b8>] (__platform_driver_register) from [<bf566024>] (sun4i_codec_driver_init+0x24/0x1000 [sun4i_codec])
> [<bf566000>] (sun4i_codec_driver_init [sun4i_codec]) from [<c030293c>] (do_one_initcall+0x50/0x274)
> [<c03028ec>] (do_one_initcall) from [<c040d45c>] (do_init_module+0x70/0x294)
> [<c040d3ec>] (do_init_module) from [<c040f9f4>] (load_module+0x2258/0x263c)
> [<c040d79c>] (load_module) from [<c04100c0>] (sys_finit_module+0xc8/0x12c)
> [<c040fff8>] (sys_finit_module) from [<c03002a4>] (__sys_trace_return+0x0/0x1c)

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: sunxi: sun4i-codec: fill ASoC card owner
      commit: 7c0d6e482062eb5c06ecccfab340abc523bdca00

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
diff mbox series

Patch

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 6c13cc84b3fb..2173991c13db 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1364,6 +1364,7 @@  static struct snd_soc_card *sun4i_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "sun4i-codec";
 	card->dapm_widgets	= sun4i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun4i_codec_card_dapm_widgets);
@@ -1396,6 +1397,7 @@  static struct snd_soc_card *sun6i_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "A31 Audio Codec";
 	card->dapm_widgets	= sun6i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun6i_codec_card_dapm_widgets);
@@ -1449,6 +1451,7 @@  static struct snd_soc_card *sun8i_a23_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "A23 Audio Codec";
 	card->dapm_widgets	= sun6i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun6i_codec_card_dapm_widgets);
@@ -1487,6 +1490,7 @@  static struct snd_soc_card *sun8i_h3_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "H3 Audio Codec";
 	card->dapm_widgets	= sun6i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun6i_codec_card_dapm_widgets);
@@ -1525,6 +1529,7 @@  static struct snd_soc_card *sun8i_v3s_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "V3s Audio Codec";
 	card->dapm_widgets	= sun6i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun6i_codec_card_dapm_widgets);