Subject: Re: [net-next:main 3/19] drivers/net/ethernet/altera/altera_tse_main.c:1419: undefined reference to `lynx_pcs_create_mdiodev'

From: Simon Horman <[email-masked]>
Date: Tue, 6 Jun 2023 09:03:48 +0200

On Tue, Jun 06, 2023 at 08:52:33AM +0200, Maxime Chevallier wrote:
> Hello Jakub,
> 
> On Mon, 5 Jun 2023 13:28:39 -0700
> Jakub Kicinski <[email-masked]> wrote:
> 
> > On Tue, 6 Jun 2023 03:17:47 +0800 kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git main
> > > head:   69da40ac3481993d6f599c98e84fcdbbf0bcd7e0
> > > commit: db48abbaa18e571106711b42affe68ca6f36ca5a [3/19] net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx
> > > config: nios2-defconfig (https://download.01.org/0day-ci/archive/20230606/[email-masked]/config)
> > > compiler: nios2-linux-gcc (GCC) 12.3.0
> > > reproduce (this is a W=1 build):
> > >         mkdir -p ~/bin
> > >         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/davem/net-next.git/commit/?id=db48abbaa18e571106711b42affe68ca6f36ca5a
> > >         git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
> > >         git fetch --no-tags net-next main
> > >         git checkout db48abbaa18e571106711b42affe68ca6f36ca5a
> > >         # save the config file
> > >         mkdir build_dir && cp config build_dir/.config
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=nios2 olddefconfig
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash
> > > 
> > > If you fix the issue, kindly add following tag where applicable
> > > | Reported-by: kernel test robot <[email-masked]>
> > > | Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/
> > > 
> > > All errors (new ones prefixed by >>):
> > > 
> > >    nios2-linux-ld: drivers/net/ethernet/altera/altera_tse_main.o: in function `altera_tse_probe':  
> > > >> drivers/net/ethernet/altera/altera_tse_main.c:1419: undefined reference to `lynx_pcs_create_mdiodev'    
> > >    drivers/net/ethernet/altera/altera_tse_main.c:1419:(.text+0xd7c): relocation truncated to fit: R_NIOS2_CALL26 against `lynx_pcs_create_mdiodev'  
> > > >> nios2-linux-ld: drivers/net/ethernet/altera/altera_tse_main.c:1451: undefined reference to `lynx_pcs_destroy'    
> > >    drivers/net/ethernet/altera/altera_tse_main.c:1451:(.text+0xdf8): relocation truncated to fit: R_NIOS2_CALL26 against `lynx_pcs_destroy'
> > >    nios2-linux-ld: drivers/net/ethernet/altera/altera_tse_main.o: in function `altera_tse_remove':  
> > > >> drivers/net/ethernet/altera/altera_tse_main.c:1473: undefined reference to `lynx_pcs_destroy'    
> > >    drivers/net/ethernet/altera/altera_tse_main.c:1473:(.text+0x1564): relocation truncated to fit: R_NIOS2_CALL26 against `lynx_pcs_destroy'  
> > 
> > Hum, if it doesn't build without the patch from Mark's tree, I think
> > we'll need to revert..
> 
> Hmpf that's an unrelated error on my side... I've sent a followup
> fix a few minutes ago. Sorry about that.

First, sorry for this mess, which I feel partly responsible for.

Second, can I clarify that the patchset [1] is intended to
resolve the build problems we have seen over the past day?

[1] [PATCH net-next 0/2] Followup fixes for the dwmac and altera lynx conversion
    https://lore.kernel.org/all/[email-masked]/