* [PATCH] ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures
@ 2025-06-09 12:12 Venkata Prasad Potturu
2025-06-09 12:16 ` Mark Brown
2025-06-09 15:39 ` Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Venkata Prasad Potturu @ 2025-06-09 12:12 UTC (permalink / raw)
To: broonie, alsa-devel
Cc: Vijendar.Mukunda, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
syed.sabakareem, mario.limonciello, yung-chuan.liao,
Venkata Prasad Potturu, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
This patch modifies the assignment of machine structure pointers in the
acp_pci_probe function. Previously, the machine pointers were assigned
using the address-of operator (&), which caused incompatibility issues
in type assignments.
Additionally, the declarations of the machine arrays in amd.h have been
updated to reflect that they are indeed arrays (`[]`). The code is
further cleaned up by declaring the codec structures in
amd-acpi-mach.c as static, reflecting their intended usage.
error: symbol 'amp_rt1019' was not declared. Should it be static?
error: symbol 'amp_max' was not declared. Should it be static?
error: symbol 'snd_soc_acpi_amd_acp_machines' was not declared. Should it be static?
error: symbol 'snd_soc_acpi_amd_rmb_acp_machines' was not declared. Should it be static?
error: symbol 'snd_soc_acpi_amd_acp63_acp_machines' was not declared. Should it be static?
error: symbol 'snd_soc_acpi_amd_acp70_acp_machines' was not declared. Should it be static?
Fixes: 9c2c0ef64009 ("ASoC: amd: acp: Fix snd_soc_acpi_mach id's duplicate symbol error")
Link: https://github.com/thesofproject/linux/issues/5438
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
---
sound/soc/amd/acp/acp-pci.c | 8 ++++----
sound/soc/amd/acp/amd-acpi-mach.c | 4 ++--
sound/soc/amd/acp/amd.h | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index 0b2aa33cc426..2591b1a1c5e0 100644
--- a/sound/soc/amd/acp/acp-pci.c
+++ b/sound/soc/amd/acp/acp-pci.c
@@ -137,26 +137,26 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
chip->name = "acp_asoc_renoir";
chip->rsrc = &rn_rsrc;
chip->acp_hw_ops_init = acp31_hw_ops_init;
- chip->machines = &snd_soc_acpi_amd_acp_machines;
+ chip->machines = snd_soc_acpi_amd_acp_machines;
break;
case 0x6f:
chip->name = "acp_asoc_rembrandt";
chip->rsrc = &rmb_rsrc;
chip->acp_hw_ops_init = acp6x_hw_ops_init;
- chip->machines = &snd_soc_acpi_amd_rmb_acp_machines;
+ chip->machines = snd_soc_acpi_amd_rmb_acp_machines;
break;
case 0x63:
chip->name = "acp_asoc_acp63";
chip->rsrc = &acp63_rsrc;
chip->acp_hw_ops_init = acp63_hw_ops_init;
- chip->machines = &snd_soc_acpi_amd_acp63_acp_machines;
+ chip->machines = snd_soc_acpi_amd_acp63_acp_machines;
break;
case 0x70:
case 0x71:
chip->name = "acp_asoc_acp70";
chip->rsrc = &acp70_rsrc;
chip->acp_hw_ops_init = acp70_hw_ops_init;
- chip->machines = &snd_soc_acpi_amd_acp70_acp_machines;
+ chip->machines = snd_soc_acpi_amd_acp70_acp_machines;
break;
default:
dev_err(dev, "Unsupported device revision:0x%x\n", pci->revision);
diff --git a/sound/soc/amd/acp/amd-acpi-mach.c b/sound/soc/amd/acp/amd-acpi-mach.c
index d95047d2ee94..27da2a862f1c 100644
--- a/sound/soc/amd/acp/amd-acpi-mach.c
+++ b/sound/soc/amd/acp/amd-acpi-mach.c
@@ -8,12 +8,12 @@
#include <sound/soc-acpi.h>
-struct snd_soc_acpi_codecs amp_rt1019 = {
+static struct snd_soc_acpi_codecs amp_rt1019 = {
.num_codecs = 1,
.codecs = {"10EC1019"}
};
-struct snd_soc_acpi_codecs amp_max = {
+static struct snd_soc_acpi_codecs amp_max = {
.num_codecs = 1,
.codecs = {"MX98360A"}
};
diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h
index 863e74fcee43..cb8d97122f95 100644
--- a/sound/soc/amd/acp/amd.h
+++ b/sound/soc/amd/acp/amd.h
@@ -243,10 +243,10 @@ extern struct acp_resource rmb_rsrc;
extern struct acp_resource acp63_rsrc;
extern struct acp_resource acp70_rsrc;
-extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines;
-extern struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_acp_machines;
-extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_acp_machines;
-extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_acp_machines;
+extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_acp_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_acp_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_acp_machines[];
extern const struct snd_soc_dai_ops asoc_acp_cpu_dai_ops;
extern const struct snd_soc_dai_ops acp_dmic_dai_ops;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures
2025-06-09 12:12 [PATCH] ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures Venkata Prasad Potturu
@ 2025-06-09 12:16 ` Mark Brown
2025-06-09 12:29 ` Venkata Prasad Potturu
2025-06-09 15:39 ` Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Mark Brown @ 2025-06-09 12:16 UTC (permalink / raw)
To: Venkata Prasad Potturu
Cc: alsa-devel, Vijendar.Mukunda, Basavaraj.Hiregoudar,
Sunil-kumar.Dommati, syed.sabakareem, mario.limonciello,
yung-chuan.liao, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
[-- Attachment #1: Type: text/plain, Size: 841 bytes --]
On Mon, Jun 09, 2025 at 05:42:32PM +0530, Venkata Prasad Potturu wrote:
> This patch modifies the assignment of machine structure pointers in the
> acp_pci_probe function. Previously, the machine pointers were assigned
> using the address-of operator (&), which caused incompatibility issues
> in type assignments.
>
> Additionally, the declarations of the machine arrays in amd.h have been
> updated to reflect that they are indeed arrays (`[]`). The code is
> further cleaned up by declaring the codec structures in
> amd-acpi-mach.c as static, reflecting their intended usage.
>
> error: symbol 'amp_rt1019' was not declared. Should it be static?
> error: symbol 'amp_max' was not declared. Should it be static?
It's fine this time but these staticisiations should have been a
separate commit since there's no overlap.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures
2025-06-09 12:16 ` Mark Brown
@ 2025-06-09 12:29 ` Venkata Prasad Potturu
0 siblings, 0 replies; 4+ messages in thread
From: Venkata Prasad Potturu @ 2025-06-09 12:29 UTC (permalink / raw)
To: Mark Brown
Cc: alsa-devel, Vijendar.Mukunda, Basavaraj.Hiregoudar,
Sunil-kumar.Dommati, syed.sabakareem, mario.limonciello,
yung-chuan.liao, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
On 6/9/25 17:46, Mark Brown wrote:
> On Mon, Jun 09, 2025 at 05:42:32PM +0530, Venkata Prasad Potturu wrote:
>> This patch modifies the assignment of machine structure pointers in the
>> acp_pci_probe function. Previously, the machine pointers were assigned
>> using the address-of operator (&), which caused incompatibility issues
>> in type assignments.
>>
>> Additionally, the declarations of the machine arrays in amd.h have been
>> updated to reflect that they are indeed arrays (`[]`). The code is
>> further cleaned up by declaring the codec structures in
>> amd-acpi-mach.c as static, reflecting their intended usage.
>>
>> error: symbol 'amp_rt1019' was not declared. Should it be static?
>> error: symbol 'amp_max' was not declared. Should it be static?
> It's fine this time but these staticisiations should have been a
> separate commit since there's no overlap.
Okay, Thanks Mark :).
I will take care next time onwards.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures
2025-06-09 12:12 [PATCH] ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures Venkata Prasad Potturu
2025-06-09 12:16 ` Mark Brown
@ 2025-06-09 15:39 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2025-06-09 15:39 UTC (permalink / raw)
To: alsa-devel, Venkata Prasad Potturu
Cc: Vijendar.Mukunda, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
syed.sabakareem, mario.limonciello, yung-chuan.liao,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
On Mon, 09 Jun 2025 17:42:32 +0530, Venkata Prasad Potturu wrote:
> This patch modifies the assignment of machine structure pointers in the
> acp_pci_probe function. Previously, the machine pointers were assigned
> using the address-of operator (&), which caused incompatibility issues
> in type assignments.
>
> Additionally, the declarations of the machine arrays in amd.h have been
> updated to reflect that they are indeed arrays (`[]`). The code is
> further cleaned up by declaring the codec structures in
> amd-acpi-mach.c as static, reflecting their intended usage.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures
commit: 0779c0ad2a7cc0ae1865860c9bc8732613cc56b1
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-09 15:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 12:12 [PATCH] ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures Venkata Prasad Potturu
2025-06-09 12:16 ` Mark Brown
2025-06-09 12:29 ` Venkata Prasad Potturu
2025-06-09 15:39 ` Mark Brown
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).