Subject: Re: linux-next: build failure after merge of the sound-asoc tree

From: "Mukunda,Vijendar" <[email-masked]>
Date: Thu, 7 Jul 2022 16:38:04 +0530

On 7/7/22 3:34 PM, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the sound-asoc tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> sound/soc/amd/acp-es8336.c: In function 'st_es8336_late_probe':
> sound/soc/amd/acp-es8336.c:204:33: error: invalid use of undefined type 'struct acpi_device'
>   204 |                 put_device(&adev->dev);
>       |                                 ^~
> sound/soc/soc-acpi.c:34:1: error: redefinition of 'snd_soc_acpi_find_machine'
>    34 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from sound/soc/soc-acpi.c:9:
> include/sound/soc-acpi.h:38:1: note: previous definition of 'snd_soc_acpi_find_machine' with type 'struct snd_soc_acpi_mach *(struct snd_soc_acpi_mach *)'
>    38 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~
> sound/soc/soc-acpi.c: In function 'snd_soc_acpi_find_package':
> sound/soc/soc-acpi.c:58:36: error: implicit declaration of function 'acpi_fetch_acpi_dev'; did you mean 'device_match_acpi_dev'? [-Werror=implicit-function-declaration]
>    58 |         struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
>       |                                    ^~~~~~~~~~~~~~~~~~~
>       |                                    device_match_acpi_dev
> sound/soc/soc-acpi.c:58:36: error: initialization of 'struct acpi_device *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
> sound/soc/soc-acpi.c:64:25: error: invalid use of undefined type 'struct acpi_device'
>    64 |         if (adev && adev->status.present && adev->status.functional) {
>       |                         ^~
> sound/soc/soc-acpi.c:64:49: error: invalid use of undefined type 'struct acpi_device'
>    64 |         if (adev && adev->status.present && adev->status.functional) {
>       |                                                 ^~
> sound/soc/soc-acpi.c:80:26: error: implicit declaration of function 'acpi_extract_package' [-Werror=implicit-function-declaration]
>    80 |                 status = acpi_extract_package(myobj,
>       |                          ^~~~~~~~~~~~~~~~~~~~
> sound/soc/soc-acpi.c: At top level:
> sound/soc/soc-acpi.c:95:6: error: redefinition of 'snd_soc_acpi_find_package_from_hid'
>    95 | bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from sound/soc/soc-acpi.c:9:
> include/sound/soc-acpi.h:44:1: note: previous definition of 'snd_soc_acpi_find_package_from_hid' with type 'bool(const u8 *, struct snd_soc_acpi_package_context *)' {aka '_Bool(const unsigned char *, struct snd_soc_acpi_package_context *)'}
>    44 | snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> sound/soc/soc-acpi.c:109:27: error: redefinition of 'snd_soc_acpi_codec_list'
>   109 | struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
>       |                           ^~~~~~~~~~~~~~~~~~~~~~~
> In file included from sound/soc/soc-acpi.c:9:
> include/sound/soc-acpi.h:51:41: note: previous definition of 'snd_soc_acpi_codec_list' with type 'struct snd_soc_acpi_mach *(void *)'
>    51 | static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
>       |                                         ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   f94fa8405801 ("ASoC: amd: enable machine driver build for Jadeite platform")
> 
> I have reverted that commit for today.
> 

Hi Stephen,

We have provided fix for build error and pushed patch for upstream review.

Patch title: " ASoC: amd: fix ACPI dependency compile errors and warnings"
patch link:
https://lore.kernel.org/lkml/[email-masked]/

We will resend the fix for upstream review.

Thanks,
Vijendar