sound/soc/codecs/cs35l41.c:1166:10: error: call to undeclared function 'acpi_device_hid'; ISO C99 and later do not support implicit function declarations
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next head: f3a0dfda57f208c90c8c73f3bee2e8390f585b1f commit: 1d44a30ae3f9195cb4eb7d81bb9ced2776232094 [6/13] ASoC: cs35l41: Fallback to using HID for system_name if no SUB is available config: arm64-randconfig-001-20250208 (https://download.01.org/0day-ci/archive/20250209/[email protected]/config) compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 6807164500e9920638e2ab0cdb4bf8321d24f8eb) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> sound/soc/codecs/cs35l41.c:1166:10: error: call to undeclared function 'acpi_device_hid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1166 | hid = acpi_device_hid(adev);
| ^
sound/soc/codecs/cs35l41.c:1166:10: note: did you mean 'acpi_device_handle'?
include/linux/acpi.h:857:27: note: 'acpi_device_handle' declared here
857 | static inline acpi_handle acpi_device_handle(struct acpi_device *adev)
| ^
>> sound/soc/codecs/cs35l41.c:1166:8: error: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion]
1166 | hid = acpi_device_hid(adev);
| ^ ~~~~~~~~~~~~~~~~~~~~~2 errors generated.
vim +/acpi_device_hid +1166 sound/soc/codecs/cs35l41.c
1150
1151 static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
1152 {
1153 struct acpi_device *adev = ACPI_COMPANION(cs35l41->dev);
1154 acpi_handle handle = acpi_device_handle(adev);
1155 const char *hid;
1156 const char *sub;
1157
1158 /* If there is no acpi_device, there is no ACPI for this system, return 0 */
1159 if (!adev)
1160 return 0;
1161
1162 sub = acpi_get_subsystem_id(handle);
1163 if (IS_ERR(sub)) {
1164 /* If no _SUB, fallback to _HID, otherwise fail */
1165 if (PTR_ERR(sub) == -ENODATA) {
> 1166 hid = acpi_device_hid(adev);
1167 /* If dummy hid, return 0 and fallback to legacy firmware path */
1168 if (!strcmp(hid, "device"))
1169 return 0;
1170 sub = kstrdup(hid, GFP_KERNEL);
1171 if (!sub)
1172 sub = ERR_PTR(-ENOMEM);
1173
1174 } else
1175 return PTR_ERR(sub);
1176 }
1177
1178 cs35l41->dsp.system_name = sub;
1179 dev_dbg(cs35l41->dev, "Subsystem ID: %s\n", cs35l41->dsp.system_name);
1180
1181 return 0;
1182 }
1183
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki