Skip to contentSkip to conversation

ALSA: hda/tas2781: Fix the ld issue reported by kernel test robot

PATCH Superseded Shenghao Ding 2 participants 2 messages May 12, 2025

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Shenghao Ding

author maintainer
#0 lore raw

PATCH v2 1/1 ALSA: hda/tas2781: Fix the ld issue reported by kernel test robot

After commit 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB")created a separated lib for i2c, tasdevice_remove used for not only for I2C but for SPI being still in that lib caused ld issue.

| Reported-by: kernel test robot <[email protected]>
| Closes: https://urldefense.com/v3/__https://lore.kernel.org/
|  oe-kbuild-all/[email protected]/
|  __;!!G3vK!U-wdsvrOG1iezggZ55RYi8ikBxMaJDVs7u17Z9-7Xa-
|  0lnyE4S3m2qmLCcHVK4qH1bD1JuBdzg$

All errors (new ones prefixed by >>):

Quoted 3 lines
Quoted 3 lines

ld.lld: error: undefined symbol: tasdevice_remove

Quoted 2 lines

referenced by tas2781_hda.c:33 (sound/pci/hda/tas2781_hda.c:33)

              vmlinux.o:(tas2781_hda_remove)

To fix this issue, the implementation of tasdevice_remove was moved from tas2781-comlib-i2c.c to tas2781-comlib.c.

Fixes 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB")

---
v2:
- put the Fixes tag to point out the commit that introduced the regression
- Add compiling error information reported by kernel test robot into patch
description.
v1:
- | Reported-by: kernel test robot <[email protected]>
| Closes: https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/[email protected]/__;!!G3vK!U-wdsvrOG1iezggZ55RYi8ikBxMaJD

---
 sound/soc/codecs/tas2781-comlib-i2c.c | 6 ------
 sound/soc/codecs/tas2781-comlib.c     | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/tas2781-comlib-i2c.c +0 -6
index a75b812618ee..c078bb0a8437 100644
@@ -364,12 +364,6 @@ int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
 }
 EXPORT_SYMBOL_GPL(tascodec_init);
 
-void tasdevice_remove(struct tasdevice_priv *tas_priv)
-{
-	mutex_destroy(&tas_priv->codec_lock);
-}
-EXPORT_SYMBOL_GPL(tasdevice_remove);
-
 MODULE_DESCRIPTION("TAS2781 common library for I2C");
 MODULE_AUTHOR("Shenghao Ding, TI, <[email protected]>");
 MODULE_LICENSE("GPL");
sound/soc/codecs/tas2781-comlib.c +6 -0
index ad2f65359b15..076c1d955972 100644
@@ -225,6 +225,12 @@ void tasdevice_dsp_remove(void *context)
 }
 EXPORT_SYMBOL_GPL(tasdevice_dsp_remove);
 
+void tasdevice_remove(struct tasdevice_priv *tas_priv)
+{
+	mutex_destroy(&tas_priv->codec_lock);
+}
+EXPORT_SYMBOL_GPL(tasdevice_remove);
+
 MODULE_DESCRIPTION("TAS2781 common library");
 MODULE_AUTHOR("Shenghao Ding, TI, <[email protected]>");
 MODULE_LICENSE("GPL");
Signature · 1 line
2.43.0
#1 lore raw
Quoted 10 lines · Shenghao Ding

After commit 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB")created a separated lib for i2c, tasdevice_remove used for not only for I2C but for SPI being still in that lib caused ld issue.

| Reported-by: kernel test robot <[email protected]>
| Closes: https://urldefense.com/v3/__https://lore.kernel.org/
|  oe-kbuild-all/[email protected]/
|  __;!!G3vK!U-wdsvrOG1iezggZ55RYi8ikBxMaJDVs7u17Z9-7Xa-
|  0lnyE4S3m2qmLCcHVK4qH1bD1JuBdzg$

This should be in a tag area below, each tag is exactly one line (the same way as Fixes:, for example)

Quoted 6 lines

All errors (new ones prefixed by >>):

Quoted 3 lines
Quoted 3 lines

ld.lld: error: undefined symbol: tasdevice_remove

Quoted 2 lines

referenced by tas2781_hda.c:33 (sound/pci/hda/tas2781_hda.c:33)

              vmlinux.o:(tas2781_hda_remove)

To fix this issue, the implementation of tasdevice_remove was moved from tas2781-comlib-i2c.c to tas2781-comlib.c.

Signature · 2 lines
With Best Regards,
Andy Shevchenko