Re: [PATCH v3 3/6] ASoC: soc-acpi: move common function topology helpers

From: kernel test robot

Date: Mon Nov 09 2026 - 05:44:12 EST


Hi Syed,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-sound/for-next]
[cannot apply to linus/master v7.4-rc2 next-20261105]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Syed-Saba-Kareem/ASoC-amd-acp-add-SoundWire-speaker-quirks-for-Dell-platforms/20261109-010030
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20261108193119.2308421-4-syed.sabakareem%40amd.com
patch subject: [PATCH v3 3/6] ASoC: soc-acpi: move common function topology helpers
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20261109/202611091824.N70ZD8Wt-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261109/202611091824.N70ZD8Wt-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611091824.N70ZD8Wt-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

sound/soc/soc-acpi.c:36:1: error: redefinition of 'snd_soc_acpi_find_machine'
36 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sound/soc/soc-acpi.c:11:
include/sound/soc-acpi.h:40:1: note: previous definition of 'snd_soc_acpi_find_machine' with type 'struct snd_soc_acpi_mach *(struct snd_soc_acpi_mach *)'
40 | 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:60:36: error: implicit declaration of function 'acpi_fetch_acpi_dev'; did you mean 'acpi_match_acpi_device'? [-Werror=implicit-function-declaration]
60 | struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
| ^~~~~~~~~~~~~~~~~~~
| acpi_match_acpi_device
>> sound/soc/soc-acpi.c:60:36: warning: initialization of 'struct acpi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
sound/soc/soc-acpi.c:66:25: error: invalid use of undefined type 'struct acpi_device'
66 | if (adev && adev->status.present && adev->status.functional) {
| ^~
sound/soc/soc-acpi.c:66:49: error: invalid use of undefined type 'struct acpi_device'
66 | if (adev && adev->status.present && adev->status.functional) {
| ^~
sound/soc/soc-acpi.c:82:26: error: implicit declaration of function 'acpi_extract_package' [-Werror=implicit-function-declaration]
82 | status = acpi_extract_package(myobj,
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/soc-acpi.c: At top level:
sound/soc/soc-acpi.c:97:6: error: redefinition of 'snd_soc_acpi_find_package_from_hid'
97 | bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sound/soc/soc-acpi.c:11:
include/sound/soc-acpi.h:46: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 *)'}
46 | snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-acpi.c:111:27: error: redefinition of 'snd_soc_acpi_codec_list'
111 | struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from sound/soc/soc-acpi.c:11:
include/sound/soc-acpi.h:53:41: note: previous definition of 'snd_soc_acpi_codec_list' with type 'struct snd_soc_acpi_mach *(void *)'
53 | static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +60 sound/soc/soc-acpi.c

95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 6
78d8db3cfe94397 sound/soc/soc-acpi.c Syed Saba Kareem 2026-11-09 7 #include <linux/device.h>
261e90829fe2f0a sound/soc/soc-acpi.c Paul Gortmaker 2019-04-13 8 #include <linux/export.h>
78d8db3cfe94397 sound/soc/soc-acpi.c Syed Saba Kareem 2026-11-09 9 #include <linux/firmware.h>
261e90829fe2f0a sound/soc/soc-acpi.c Paul Gortmaker 2019-04-13 10 #include <linux/module.h>
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 @11 #include <sound/soc-acpi.h>
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 12
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 13 static bool snd_soc_acpi_id_present(struct snd_soc_acpi_mach *machine)
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 14 {
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 15 const struct snd_soc_acpi_codecs *comp_ids = machine->comp_ids;
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 16 int i;
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 17
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 18 if (machine->id[0]) {
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 19 if (acpi_dev_present(machine->id, NULL, -1))
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 20 return true;
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 21 }
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 22
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 23 if (comp_ids) {
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 24 for (i = 0; i < comp_ids->num_codecs; i++) {
28c916ade1bd420 sound/soc/soc-acpi.c Hans de Goede 2021-11-18 25 if (acpi_dev_present(comp_ids->codecs[i], NULL, -1)) {
28c916ade1bd420 sound/soc/soc-acpi.c Hans de Goede 2021-11-18 26 strscpy(machine->id, comp_ids->codecs[i], ACPI_ID_LEN);
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 27 return true;
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 28 }
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 29 }
28c916ade1bd420 sound/soc/soc-acpi.c Hans de Goede 2021-11-18 30 }
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 31
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 32 return false;
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 33 }
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 34
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 35 struct snd_soc_acpi_mach *
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 36 snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 37 {
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 38 struct snd_soc_acpi_mach *mach;
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 39 struct snd_soc_acpi_mach *mach_alt;
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 40
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 41 for (mach = machines; mach->id[0] || mach->comp_ids; mach++) {
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 42 if (snd_soc_acpi_id_present(mach)) {
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 43 if (mach->machine_quirk) {
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 44 mach_alt = mach->machine_quirk(mach);
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 45 if (!mach_alt)
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 46 continue; /* not full match, ignore */
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 47 mach = mach_alt;
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 48 }
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 49
7827d66946ad3af sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 50 return mach;
7827d66946ad3af sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 51 }
7827d66946ad3af sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 52 }
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 53 return NULL;
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 54 }
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 55 EXPORT_SYMBOL_GPL(snd_soc_acpi_find_machine);
8ceffd229f0ef13 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2016-02-08 56
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 57 static acpi_status snd_soc_acpi_find_package(acpi_handle handle, u32 level,
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 58 void *context, void **ret)
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 59 {
ff4865b3c8cd746 sound/soc/soc-acpi.c Rafael J. Wysocki 2022-01-26 @60 struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
59ce3233a538fc2 sound/soc/soc-acpi.c Pierre-Louis Bossart 2021-04-16 61 acpi_status status;
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 62 struct snd_soc_acpi_package_context *pkg_ctx = context;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 63
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 64 pkg_ctx->data_valid = false;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 65
ff4865b3c8cd746 sound/soc/soc-acpi.c Rafael J. Wysocki 2022-01-26 66 if (adev && adev->status.present && adev->status.functional) {
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 67 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 68 union acpi_object *myobj = NULL;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 69
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 70 status = acpi_evaluate_object_typed(handle, pkg_ctx->name,
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 71 NULL, &buffer,
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 72 ACPI_TYPE_PACKAGE);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 73 if (ACPI_FAILURE(status))
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 74 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 75
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 76 myobj = buffer.pointer;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 77 if (!myobj || myobj->package.count != pkg_ctx->length) {
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 78 kfree(buffer.pointer);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 79 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 80 }
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 81
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 82 status = acpi_extract_package(myobj,
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 83 pkg_ctx->format, pkg_ctx->state);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 84 if (ACPI_FAILURE(status)) {
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 85 kfree(buffer.pointer);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 86 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 87 }
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 88
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 89 kfree(buffer.pointer);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 90 pkg_ctx->data_valid = true;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 91 return AE_CTRL_TERMINATE;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 92 }
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 93
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 94 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 95 }
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 96

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki