public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: cirrus_scodec: Select GPIOLIB for KUnit test
@ 2023-09-20  9:03 Richard Fitzgerald
  2023-09-20  9:20 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2023-09-20  9:03 UTC (permalink / raw)
  To: tiwai
  Cc: alsa-devel, patches, linux-kernel, Richard Fitzgerald,
	kernel test robot

The KUnit test for cirrus_scodec uses GPIO library functions so select
GPIOLIB in Kconfig.

This fixes the ld failures on builds that didn't already select GPIOLIB.
 ld: vmlinux.o: in function `cirrus_scodec_test_gpio_get':
 sound/pci/hda/cirrus_scodec_test.c:40: undefined reference to
	`gpiochip_get_data'
 ld: vmlinux.o: in function `cirrus_scodec_test_gpio_probe':
 sound/pci/hda/cirrus_scodec_test.c:94: undefined reference to
	`gpiochip_generic_request'
 ld: sound/pci/hda/cirrus_scodec_test.c:94: undefined reference to
	`gpiochip_generic_free'
 ld: sound/pci/hda/cirrus_scodec_test.c:95: undefined reference to
	`devm_gpiochip_add_data_with_key'

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309201646.NnjfKPWk-lkp@intel.com/
Fixes: 2144833e7b41 ("ALSA: hda: cirrus_scodec: Add KUnit test")
---
 sound/pci/hda/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
index 706cdc589e6f..21a90b3c4cc7 100644
--- a/sound/pci/hda/Kconfig
+++ b/sound/pci/hda/Kconfig
@@ -97,6 +97,7 @@ config SND_HDA_CIRRUS_SCODEC
 config SND_HDA_CIRRUS_SCODEC_KUNIT_TEST
 	tristate "KUnit test for Cirrus side-codec library" if !KUNIT_ALL_TESTS
 	select SND_HDA_CIRRUS_SCODEC
+	select GPIOLIB
 	depends on KUNIT
 	default KUNIT_ALL_TESTS
 	help
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda: cirrus_scodec: Select GPIOLIB for KUnit test
  2023-09-20  9:03 [PATCH] ALSA: hda: cirrus_scodec: Select GPIOLIB for KUnit test Richard Fitzgerald
@ 2023-09-20  9:20 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2023-09-20  9:20 UTC (permalink / raw)
  To: Richard Fitzgerald
  Cc: tiwai, alsa-devel, patches, linux-kernel, kernel test robot

On Wed, 20 Sep 2023 11:03:38 +0200,
Richard Fitzgerald wrote:
> 
> The KUnit test for cirrus_scodec uses GPIO library functions so select
> GPIOLIB in Kconfig.
> 
> This fixes the ld failures on builds that didn't already select GPIOLIB.
>  ld: vmlinux.o: in function `cirrus_scodec_test_gpio_get':
>  sound/pci/hda/cirrus_scodec_test.c:40: undefined reference to
> 	`gpiochip_get_data'
>  ld: vmlinux.o: in function `cirrus_scodec_test_gpio_probe':
>  sound/pci/hda/cirrus_scodec_test.c:94: undefined reference to
> 	`gpiochip_generic_request'
>  ld: sound/pci/hda/cirrus_scodec_test.c:94: undefined reference to
> 	`gpiochip_generic_free'
>  ld: sound/pci/hda/cirrus_scodec_test.c:95: undefined reference to
> 	`devm_gpiochip_add_data_with_key'
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202309201646.NnjfKPWk-lkp@intel.com/
> Fixes: 2144833e7b41 ("ALSA: hda: cirrus_scodec: Add KUnit test")

Thanks, applied now.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-20  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20  9:03 [PATCH] ALSA: hda: cirrus_scodec: Select GPIOLIB for KUnit test Richard Fitzgerald
2023-09-20  9:20 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox