2022-04-11 15:21:54

by Alvin Šipraga

[permalink] [raw]
Subject: Re: or1k-linux-ld: drivers/net/dsa/realtek/realtek-smi.o:undefined reference to `rtl8366rb_variant'

Hello test robot,

On Mon, Apr 11, 2022 at 07:24:03AM +0800, kernel test robot wrote:
> Hi Luiz,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 4ea3c6425269d33da53c79d539ce9554117cf4d4
> commit: 765c39a4fafe6f7ea0d370aa5f30c811579cf8eb net: dsa: realtek: convert subdrivers into modules
> date: 2 months ago
> config: openrisc-buildonly-randconfig-r003-20220411 (https://download.01.org/0day-ci/archive/20220411/[email protected]/config)
> compiler: or1k-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=765c39a4fafe6f7ea0d370aa5f30c811579cf8eb
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 765c39a4fafe6f7ea0d370aa5f30c811579cf8eb
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=openrisc SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <[email protected]>
>
> All errors (new ones prefixed by >>):
>
> >> or1k-linux-ld: drivers/net/dsa/realtek/realtek-smi.o:(.rodata+0x16c): undefined reference to `rtl8366rb_variant'

Yes, that might happen, since the config looks like this:

CONFIG_NET_DSA_REALTEK=y
CONFIG_NET_DSA_REALTEK_SMI=y
CONFIG_NET_DSA_REALTEK_RTL8365MB=y
CONFIG_NET_DSA_REALTEK_RTL8366RB=m

I'll take a look later this evening and prepare a patch for net.

Kind regards,
Alvin

>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp