alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [asoc:for-5.7 21/76] wcd9335.c:undefined reference to `slim_stream_prepare'
@ 2020-02-17 21:54 kbuild test robot
  2020-02-18 14:13 ` "imply" and modular target dependencies (was: Re: [asoc:for-5.7 21/76] wcd9335.c:undefined reference to `slim_stream_prepare') Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2020-02-17 21:54 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: alsa-devel, Mark Brown, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4244 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.7
head:   3cd23f021e2e5f3350125abcb39f12430df87d06
commit: ea00d95200d02ece71f5814d41b14f2eb16d598b [21/76] ASoC: Use imply for SND_SOC_ALL_CODECS
config: x86_64-randconfig-s2-20200217 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        git checkout ea00d95200d02ece71f5814d41b14f2eb16d598b
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_read_reg':
   ab8500-codec.c:(.text+0x479): undefined reference to `abx500_get_register_interruptible'
   ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_probe':
   ab8500-codec.c:(.text+0xdf1): undefined reference to `abx500_get_register_interruptible'
   ld: ab8500-codec.c:(.text+0xe18): undefined reference to `abx500_set_register_interruptible'
   ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_write_reg':
   ab8500-codec.c:(.text+0x4b1): undefined reference to `abx500_set_register_interruptible'
   ld: sound/soc/codecs/mc13783.o: in function `mc13783_probe':
   mc13783.c:(.text+0x24c): undefined reference to `mc13xxx_reg_write'
   ld: mc13783.c:(.text+0x25e): undefined reference to `mc13xxx_reg_write'
   ld: mc13783.c:(.text+0x270): undefined reference to `mc13xxx_reg_write'
   ld: mc13783.c:(.text+0x282): undefined reference to `mc13xxx_reg_write'
   ld: mc13783.c:(.text+0x294): undefined reference to `mc13xxx_reg_write'
   ld: sound/soc/codecs/mc13783.o:mc13783.c:(.text+0x2a6): more undefined references to `mc13xxx_reg_write' follow
   ld: sound/soc/codecs/mc13783.o: in function `mc13783_probe':
   mc13783.c:(.text+0x2c5): undefined reference to `mc13xxx_reg_rmw'
   ld: mc13783.c:(.text+0x2e4): undefined reference to `mc13xxx_reg_rmw'
   ld: sound/soc/codecs/mc13783.o: in function `mc13783_remove':
   mc13783.c:(.text+0x212): undefined reference to `mc13xxx_reg_rmw'
   ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_trigger':
>> wcd9335.c:(.text+0x323): undefined reference to `slim_stream_prepare'
>> ld: wcd9335.c:(.text+0x32f): undefined reference to `slim_stream_enable'
>> ld: wcd9335.c:(.text+0x345): undefined reference to `slim_stream_unprepare'
>> ld: wcd9335.c:(.text+0x351): undefined reference to `slim_stream_disable'
   ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_status':
>> wcd9335.c:(.text+0x1970): undefined reference to `of_slim_get_device'
>> ld: wcd9335.c:(.text+0x1995): undefined reference to `slim_get_logical_addr'
>> ld: wcd9335.c:(.text+0x19b2): undefined reference to `__regmap_init_slimbus'
   ld: wcd9335.c:(.text+0x19f3): undefined reference to `__regmap_init_slimbus'
   ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_hw_params':
>> wcd9335.c:(.text+0x348f): undefined reference to `slim_stream_allocate'
   ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_driver_init':
>> wcd9335.c:(.init.text+0x3c): undefined reference to `__slim_driver_register'
   ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_driver_exit':
>> wcd9335.c:(.exit.text+0x8): undefined reference to `slim_driver_unregister'
   ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_trigger':
>> wcd934x.c:(.text+0x30d): undefined reference to `slim_stream_prepare'
>> ld: wcd934x.c:(.text+0x319): undefined reference to `slim_stream_enable'
>> ld: wcd934x.c:(.text+0x32f): undefined reference to `slim_stream_unprepare'
>> ld: wcd934x.c:(.text+0x33b): undefined reference to `slim_stream_disable'
   ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_hw_params':
>> wcd934x.c:(.text+0x2620): undefined reference to `slim_stream_allocate'
   ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_codec_probe':
>> wcd934x.c:(.text+0x27ee): undefined reference to `of_slim_get_device'
>> ld: wcd934x.c:(.text+0x2818): undefined reference to `slim_get_logical_addr'
>> ld: wcd934x.c:(.text+0x2836): undefined reference to `__regmap_init_slimbus'

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 46483 bytes --]

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

* "imply" and modular target dependencies (was: Re: [asoc:for-5.7 21/76] wcd9335.c:undefined reference to `slim_stream_prepare')
  2020-02-17 21:54 [asoc:for-5.7 21/76] wcd9335.c:undefined reference to `slim_stream_prepare' kbuild test robot
@ 2020-02-18 14:13 ` Geert Uytterhoeven
  2020-02-18 17:31   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2020-02-18 14:13 UTC (permalink / raw)
  To: kbuild test robot
  Cc: ALSA Development Mailing List, Mark Brown, kbuild-all,
	Masahiro Yamada, Arnd Bergmann

On Mon, Feb 17, 2020 at 10:55 PM kbuild test robot <lkp@intel.com> wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.7
> head:   3cd23f021e2e5f3350125abcb39f12430df87d06
> commit: ea00d95200d02ece71f5814d41b14f2eb16d598b [21/76] ASoC: Use imply for SND_SOC_ALL_CODECS
> config: x86_64-randconfig-s2-20200217 (attached as .config)
> compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
> reproduce:
>         git checkout ea00d95200d02ece71f5814d41b14f2eb16d598b
>         # save the attached .config to linux build tree
>         make ARCH=x86_64
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>

Thanks for your report!

> All errors (new ones prefixed by >>):
>
>    ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_read_reg':
>    ab8500-codec.c:(.text+0x479): undefined reference to `abx500_get_register_interruptible'
>    ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_probe':
>    ab8500-codec.c:(.text+0xdf1): undefined reference to `abx500_get_register_interruptible'
>    ld: ab8500-codec.c:(.text+0xe18): undefined reference to `abx500_set_register_interruptible'
>    ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_write_reg':
>    ab8500-codec.c:(.text+0x4b1): undefined reference to `abx500_set_register_interruptible'

The above are fixed in next-20200218.

>    ld: sound/soc/codecs/mc13783.o: in function `mc13783_probe':
>    mc13783.c:(.text+0x24c): undefined reference to `mc13xxx_reg_write'
>    ld: mc13783.c:(.text+0x25e): undefined reference to `mc13xxx_reg_write'
>    ld: mc13783.c:(.text+0x270): undefined reference to `mc13xxx_reg_write'
>    ld: mc13783.c:(.text+0x282): undefined reference to `mc13xxx_reg_write'
>    ld: mc13783.c:(.text+0x294): undefined reference to `mc13xxx_reg_write'
>    ld: sound/soc/codecs/mc13783.o:mc13783.c:(.text+0x2a6): more undefined references to `mc13xxx_reg_write' follow
>    ld: sound/soc/codecs/mc13783.o: in function `mc13783_probe':
>    mc13783.c:(.text+0x2c5): undefined reference to `mc13xxx_reg_rmw'
>    ld: mc13783.c:(.text+0x2e4): undefined reference to `mc13xxx_reg_rmw'
>    ld: sound/soc/codecs/mc13783.o: in function `mc13783_remove':
>    mc13783.c:(.text+0x212): undefined reference to `mc13xxx_reg_rmw'

CONFIG_SND_SOC_MC13783=y
CONFIG_MFD_MC13XXX=m

>    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_trigger':
> >> wcd9335.c:(.text+0x323): undefined reference to `slim_stream_prepare'
> >> ld: wcd9335.c:(.text+0x32f): undefined reference to `slim_stream_enable'
> >> ld: wcd9335.c:(.text+0x345): undefined reference to `slim_stream_unprepare'
> >> ld: wcd9335.c:(.text+0x351): undefined reference to `slim_stream_disable'
>    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_status':
> >> wcd9335.c:(.text+0x1970): undefined reference to `of_slim_get_device'
> >> ld: wcd9335.c:(.text+0x1995): undefined reference to `slim_get_logical_addr'
> >> ld: wcd9335.c:(.text+0x19b2): undefined reference to `__regmap_init_slimbus'
>    ld: wcd9335.c:(.text+0x19f3): undefined reference to `__regmap_init_slimbus'
>    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_hw_params':
> >> wcd9335.c:(.text+0x348f): undefined reference to `slim_stream_allocate'
>    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_driver_init':
> >> wcd9335.c:(.init.text+0x3c): undefined reference to `__slim_driver_register'
>    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_driver_exit':
> >> wcd9335.c:(.exit.text+0x8): undefined reference to `slim_driver_unregister'

CONFIG_SND_SOC_WCD9335=y
CONFIG_SLIMBUS=m

>    ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_trigger':
> >> wcd934x.c:(.text+0x30d): undefined reference to `slim_stream_prepare'
> >> ld: wcd934x.c:(.text+0x319): undefined reference to `slim_stream_enable'
> >> ld: wcd934x.c:(.text+0x32f): undefined reference to `slim_stream_unprepare'
> >> ld: wcd934x.c:(.text+0x33b): undefined reference to `slim_stream_disable'
>    ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_hw_params':
> >> wcd934x.c:(.text+0x2620): undefined reference to `slim_stream_allocate'
>    ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_codec_probe':
> >> wcd934x.c:(.text+0x27ee): undefined reference to `of_slim_get_device'
> >> ld: wcd934x.c:(.text+0x2818): undefined reference to `slim_get_logical_addr'
> >> ld: wcd934x.c:(.text+0x2836): undefined reference to `__regmap_init_slimbus'

CONFIG_SND_SOC_WCD934X=y
CONFIG_SLIMBUS=m

All CONFIG_SND_SOC_* symbols above are tristate and have dependencies
on the modular symbols.

However, the "imply" statements in SND_SOC_ALL_CODECS force all of them
builtin, despite their dependencies being modular.

So while "imply" is meant to be a softer form of "select", obeying target
dependencies, it does not seem to obey modular tristate dependencies?

Or am I missing something?
Thanks!

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: "imply" and modular target dependencies (was: Re: [asoc:for-5.7 21/76] wcd9335.c:undefined reference to `slim_stream_prepare')
  2020-02-18 14:13 ` "imply" and modular target dependencies (was: Re: [asoc:for-5.7 21/76] wcd9335.c:undefined reference to `slim_stream_prepare') Geert Uytterhoeven
@ 2020-02-18 17:31   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2020-02-18 17:31 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: ALSA Development Mailing List, Mark Brown, kbuild-all,
	kbuild test robot, Arnd Bergmann

[-- Attachment #1: Type: text/plain, Size: 6274 bytes --]

Hi Geert,


On Tue, Feb 18, 2020 at 11:13 PM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> On Mon, Feb 17, 2020 at 10:55 PM kbuild test robot <lkp@intel.com> wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.7
> > head:   3cd23f021e2e5f3350125abcb39f12430df87d06
> > commit: ea00d95200d02ece71f5814d41b14f2eb16d598b [21/76] ASoC: Use imply for SND_SOC_ALL_CODECS
> > config: x86_64-randconfig-s2-20200217 (attached as .config)
> > compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
> > reproduce:
> >         git checkout ea00d95200d02ece71f5814d41b14f2eb16d598b
> >         # save the attached .config to linux build tree
> >         make ARCH=x86_64
> >
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot <lkp@intel.com>
>
> Thanks for your report!
>
> > All errors (new ones prefixed by >>):
> >
> >    ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_read_reg':
> >    ab8500-codec.c:(.text+0x479): undefined reference to `abx500_get_register_interruptible'
> >    ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_probe':
> >    ab8500-codec.c:(.text+0xdf1): undefined reference to `abx500_get_register_interruptible'
> >    ld: ab8500-codec.c:(.text+0xe18): undefined reference to `abx500_set_register_interruptible'
> >    ld: sound/soc/codecs/ab8500-codec.o: in function `ab8500_codec_write_reg':
> >    ab8500-codec.c:(.text+0x4b1): undefined reference to `abx500_set_register_interruptible'
>
> The above are fixed in next-20200218.
>
> >    ld: sound/soc/codecs/mc13783.o: in function `mc13783_probe':
> >    mc13783.c:(.text+0x24c): undefined reference to `mc13xxx_reg_write'
> >    ld: mc13783.c:(.text+0x25e): undefined reference to `mc13xxx_reg_write'
> >    ld: mc13783.c:(.text+0x270): undefined reference to `mc13xxx_reg_write'
> >    ld: mc13783.c:(.text+0x282): undefined reference to `mc13xxx_reg_write'
> >    ld: mc13783.c:(.text+0x294): undefined reference to `mc13xxx_reg_write'
> >    ld: sound/soc/codecs/mc13783.o:mc13783.c:(.text+0x2a6): more undefined references to `mc13xxx_reg_write' follow
> >    ld: sound/soc/codecs/mc13783.o: in function `mc13783_probe':
> >    mc13783.c:(.text+0x2c5): undefined reference to `mc13xxx_reg_rmw'
> >    ld: mc13783.c:(.text+0x2e4): undefined reference to `mc13xxx_reg_rmw'
> >    ld: sound/soc/codecs/mc13783.o: in function `mc13783_remove':
> >    mc13783.c:(.text+0x212): undefined reference to `mc13xxx_reg_rmw'
>
> CONFIG_SND_SOC_MC13783=y
> CONFIG_MFD_MC13XXX=m
>
> >    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_trigger':
> > >> wcd9335.c:(.text+0x323): undefined reference to `slim_stream_prepare'
> > >> ld: wcd9335.c:(.text+0x32f): undefined reference to `slim_stream_enable'
> > >> ld: wcd9335.c:(.text+0x345): undefined reference to `slim_stream_unprepare'
> > >> ld: wcd9335.c:(.text+0x351): undefined reference to `slim_stream_disable'
> >    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_status':
> > >> wcd9335.c:(.text+0x1970): undefined reference to `of_slim_get_device'
> > >> ld: wcd9335.c:(.text+0x1995): undefined reference to `slim_get_logical_addr'
> > >> ld: wcd9335.c:(.text+0x19b2): undefined reference to `__regmap_init_slimbus'
> >    ld: wcd9335.c:(.text+0x19f3): undefined reference to `__regmap_init_slimbus'
> >    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_hw_params':
> > >> wcd9335.c:(.text+0x348f): undefined reference to `slim_stream_allocate'
> >    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_driver_init':
> > >> wcd9335.c:(.init.text+0x3c): undefined reference to `__slim_driver_register'
> >    ld: sound/soc/codecs/wcd9335.o: in function `wcd9335_slim_driver_exit':
> > >> wcd9335.c:(.exit.text+0x8): undefined reference to `slim_driver_unregister'
>
> CONFIG_SND_SOC_WCD9335=y
> CONFIG_SLIMBUS=m
>
> >    ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_trigger':
> > >> wcd934x.c:(.text+0x30d): undefined reference to `slim_stream_prepare'
> > >> ld: wcd934x.c:(.text+0x319): undefined reference to `slim_stream_enable'
> > >> ld: wcd934x.c:(.text+0x32f): undefined reference to `slim_stream_unprepare'
> > >> ld: wcd934x.c:(.text+0x33b): undefined reference to `slim_stream_disable'
> >    ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_hw_params':
> > >> wcd934x.c:(.text+0x2620): undefined reference to `slim_stream_allocate'
> >    ld: sound/soc/codecs/wcd934x.o: in function `wcd934x_codec_probe':
> > >> wcd934x.c:(.text+0x27ee): undefined reference to `of_slim_get_device'
> > >> ld: wcd934x.c:(.text+0x2818): undefined reference to `slim_get_logical_addr'
> > >> ld: wcd934x.c:(.text+0x2836): undefined reference to `__regmap_init_slimbus'
>
> CONFIG_SND_SOC_WCD934X=y
> CONFIG_SLIMBUS=m
>
> All CONFIG_SND_SOC_* symbols above are tristate and have dependencies
> on the modular symbols.
>
> However, the "imply" statements in SND_SOC_ALL_CODECS force all of them
> builtin, despite their dependencies being modular.
>
> So while "imply" is meant to be a softer form of "select", obeying target
> dependencies, it does not seem to obey modular tristate dependencies?


I quickly checked the Kconfig code.

Surprisingly or not, 'imply' does not
obey 'depends on'.

I do not know if it is a bug, or intended behavior
but at least the current code works so.
(I am guessing this is a bug...)

I checked Documentation/kbuild/kconfig-language.rst
Unfortunately, this case is not documented.


        ===             ===             =============   ==============
        FOO             BAR             BAZ's default   choice for BAZ
        ===             ===             =============   ==============
        n               y               n               N/m/y
        m               y               m               M/y/n
        y               y               y               Y/n
        y               n               *               N
        y               m               <undocumented>  <undocumented>
        ===             ===             =============   ==============



I attached a patch, which changes the 'imply' to
follow the restriction of 'depends on',
but I need to take a closer look at this.





> Or am I missing something?
> Thanks!



-- 
Best Regards
Masahiro Yamada

[-- Attachment #2: 0001-kconfig-change-imply-to-respect-depends-on.patch --]
[-- Type: text/x-patch, Size: 1238 bytes --]

From 4ec542e201900c0dd1e06a49ca307f0fe9d2c4ca Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <masahiroy@kernel.org>
Date: Wed, 19 Feb 2020 02:14:48 +0900
Subject: [PATCH] kconfig: change 'imply' to respect 'depends on'

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
 scripts/kconfig/symbol.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 8d38b700b314..45003d7dfb0a 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -393,7 +393,9 @@ void sym_calc_value(struct symbol *sym)
 				}
 				if (sym->implied.tri != no) {
 					sym->flags |= SYMBOL_WRITE;
-					newval.tri = EXPR_OR(newval.tri, sym->implied.tri);
+					newval.tri = EXPR_OR(newval.tri,
+							     EXPR_AND(sym->dir_dep.tri,
+								      sym->implied.tri));
 				}
 			}
 		calc_newval:
@@ -401,8 +403,7 @@ void sym_calc_value(struct symbol *sym)
 				sym_warn_unmet_dep(sym);
 			newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
 		}
-		if (newval.tri == mod &&
-		    (sym_get_type(sym) == S_BOOLEAN || sym->implied.tri == yes))
+		if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
 			newval.tri = yes;
 		break;
 	case S_STRING:
-- 
2.17.1


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

end of thread, other threads:[~2020-02-18 17:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 21:54 [asoc:for-5.7 21/76] wcd9335.c:undefined reference to `slim_stream_prepare' kbuild test robot
2020-02-18 14:13 ` "imply" and modular target dependencies (was: Re: [asoc:for-5.7 21/76] wcd9335.c:undefined reference to `slim_stream_prepare') Geert Uytterhoeven
2020-02-18 17:31   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).