All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: mediatek: SND_SOC_MT8195 remove depends on COMPILE_TEST
@ 2021-09-18  5:16 Jackie Liu
  2021-09-19 11:21   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Jackie Liu @ 2021-09-18  5:16 UTC (permalink / raw)
  To: geert+renesas; +Cc: alsa-devel, linux-kernel, perex

From: Jackie Liu <liuyun01@kylinos.cn>

After compiling with COMPILE_TEST, we are most likely to compile on a
different architecture, such as x86. At this time, it is possible that
the HAVE_CLK macro is not selected, resulting in compilation failure.

Avoid fail like:

  Kernel: arch/x86/boot/bzImage is ready  (#17)
  ERROR: modpost: "clkdev_add" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
  ERROR: modpost: "clkdev_drop" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
  ERROR: modpost: "clk_unregister_gate" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
  ERROR: modpost: "clk_register_gate" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
  make[1]: *** [scripts/Makefile.modpost:134: modules-only.symvers] Error 1
  make[1]: *** Deleting file 'modules-only.symvers'
  make: *** [Makefile:1783: modules] Error 2

Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Fixes: 940ffa194547 ("ASoC: mediatek: SND_SOC_MT8195 should depend on ARCH_MEDIATEK")
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
 sound/soc/mediatek/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig
index 5a2f4667d50b..2287328e845c 100644
--- a/sound/soc/mediatek/Kconfig
+++ b/sound/soc/mediatek/Kconfig
@@ -187,7 +187,7 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682
 
 config SND_SOC_MT8195
 	tristate "ASoC support for Mediatek MT8195 chip"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on ARCH_MEDIATEK
 	select SND_SOC_MEDIATEK
 	help
 	  This adds ASoC platform driver support for Mediatek MT8195 chip
-- 
2.25.1


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

* Re: [PATCH] ASoC: mediatek: SND_SOC_MT8195 remove depends on COMPILE_TEST
  2021-09-18  5:16 [PATCH] ASoC: mediatek: SND_SOC_MT8195 remove depends on COMPILE_TEST Jackie Liu
@ 2021-09-19 11:21   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-09-19 11:21 UTC (permalink / raw)
  To: Jackie Liu
  Cc: Geert Uytterhoeven, ALSA Development Mailing List,
	Linux Kernel Mailing List, Jaroslav Kysela

Hi Jackie,

On Sat, Sep 18, 2021 at 7:17 AM Jackie Liu <liu.yun@linux.dev> wrote:
> From: Jackie Liu <liuyun01@kylinos.cn>
>
> After compiling with COMPILE_TEST, we are most likely to compile on a
> different architecture, such as x86. At this time, it is possible that
> the HAVE_CLK macro is not selected, resulting in compilation failure.
>
> Avoid fail like:
>
>   Kernel: arch/x86/boot/bzImage is ready  (#17)
>   ERROR: modpost: "clkdev_add" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
>   ERROR: modpost: "clkdev_drop" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
>   ERROR: modpost: "clk_unregister_gate" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
>   ERROR: modpost: "clk_register_gate" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
>   make[1]: *** [scripts/Makefile.modpost:134: modules-only.symvers] Error 1
>   make[1]: *** Deleting file 'modules-only.symvers'
>   make: *** [Makefile:1783: modules] Error 2
>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Fixes: 940ffa194547 ("ASoC: mediatek: SND_SOC_MT8195 should depend on ARCH_MEDIATEK")
> Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>

Thanks for your patch!

> --- a/sound/soc/mediatek/Kconfig
> +++ b/sound/soc/mediatek/Kconfig
> @@ -187,7 +187,7 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682
>
>  config SND_SOC_MT8195
>         tristate "ASoC support for Mediatek MT8195 chip"
> -       depends on ARCH_MEDIATEK || COMPILE_TEST
> +       depends on ARCH_MEDIATEK

Instead of dropping support for compile-testing, wouldn't it be better
to add the missing real dependencies?

    HAVE_CLK (clkdev_add, clkdev_drop)
    COMMON_CLK (clk_unregister_gate, clk_register_gate)

As the latter selects the former, adding the line

    depends on COMMON_CLK

Also, the Fixes line is wrong as the link failure happened before.
Fixes: 6746cc858259985a ("ASoC: mediatek: mt8195: add platform driver")

>         select SND_SOC_MEDIATEK
>         help
>           This adds ASoC platform driver support for Mediatek MT8195 chip

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] ASoC: mediatek: SND_SOC_MT8195 remove depends on COMPILE_TEST
@ 2021-09-19 11:21   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-09-19 11:21 UTC (permalink / raw)
  To: Jackie Liu
  Cc: ALSA Development Mailing List, Linux Kernel Mailing List,
	Geert Uytterhoeven

Hi Jackie,

On Sat, Sep 18, 2021 at 7:17 AM Jackie Liu <liu.yun@linux.dev> wrote:
> From: Jackie Liu <liuyun01@kylinos.cn>
>
> After compiling with COMPILE_TEST, we are most likely to compile on a
> different architecture, such as x86. At this time, it is possible that
> the HAVE_CLK macro is not selected, resulting in compilation failure.
>
> Avoid fail like:
>
>   Kernel: arch/x86/boot/bzImage is ready  (#17)
>   ERROR: modpost: "clkdev_add" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
>   ERROR: modpost: "clkdev_drop" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
>   ERROR: modpost: "clk_unregister_gate" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
>   ERROR: modpost: "clk_register_gate" [sound/soc/mediatek/mt8195/snd-soc-mt8195-afe.ko] undefined!
>   make[1]: *** [scripts/Makefile.modpost:134: modules-only.symvers] Error 1
>   make[1]: *** Deleting file 'modules-only.symvers'
>   make: *** [Makefile:1783: modules] Error 2
>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Fixes: 940ffa194547 ("ASoC: mediatek: SND_SOC_MT8195 should depend on ARCH_MEDIATEK")
> Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>

Thanks for your patch!

> --- a/sound/soc/mediatek/Kconfig
> +++ b/sound/soc/mediatek/Kconfig
> @@ -187,7 +187,7 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682
>
>  config SND_SOC_MT8195
>         tristate "ASoC support for Mediatek MT8195 chip"
> -       depends on ARCH_MEDIATEK || COMPILE_TEST
> +       depends on ARCH_MEDIATEK

Instead of dropping support for compile-testing, wouldn't it be better
to add the missing real dependencies?

    HAVE_CLK (clkdev_add, clkdev_drop)
    COMMON_CLK (clk_unregister_gate, clk_register_gate)

As the latter selects the former, adding the line

    depends on COMMON_CLK

Also, the Fixes line is wrong as the link failure happened before.
Fixes: 6746cc858259985a ("ASoC: mediatek: mt8195: add platform driver")

>         select SND_SOC_MEDIATEK
>         help
>           This adds ASoC platform driver support for Mediatek MT8195 chip

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2021-09-19 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18  5:16 [PATCH] ASoC: mediatek: SND_SOC_MT8195 remove depends on COMPILE_TEST Jackie Liu
2021-09-19 11:21 ` Geert Uytterhoeven
2021-09-19 11:21   ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.