All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: kbuild-all@lists.01.org
Subject: Re: [mtd:spi-mem-ecc 29/29] drivers/spi/spi-mxic.c:688: undefined reference to `nand_ecc_unregister_on_host_hw_engine'
Date: Fri, 28 Jan 2022 18:05:10 +0100	[thread overview]
Message-ID: <20220128180510.51d304ea@xps13> (raw)
In-Reply-To: <202201282024.dNzYfD56-lkp@intel.com>

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


lkp(a)intel.com wrote on Fri, 28 Jan 2022 21:01:33 +0800:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-mem-ecc
> head:   493b08141c0086ddb2126179cca7a8a7936b3582
> commit: 493b08141c0086ddb2126179cca7a8a7936b3582 [29/29] spi: mxic: Add support for pipelined ECC operations
> config: i386-randconfig-a014-20210930 (https://download.01.org/0day-ci/archive/20220128/202201282024.dNzYfD56-lkp(a)intel.com/config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/commit/?id=493b08141c0086ddb2126179cca7a8a7936b3582
>         git remote add mtd https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
>         git fetch --no-tags mtd spi-mem-ecc
>         git checkout 493b08141c0086ddb2126179cca7a8a7936b3582
>         # save the config file to linux build tree
>         mkdir build_dir
>         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    ld: drivers/spi/spi-mxic.o: in function `mxic_spi_mem_ecc_remove':
> >> drivers/spi/spi-mxic.c:688: undefined reference to `nand_ecc_unregister_on_host_hw_engine'  

Today I learned that unlike "depends on", "select" does not enforce any
type (y or m), which can lead to the following situation:

SPI_MXIC=y expects the NAND symbols to be built statically
SPI_MXIC depends on MTD_NAND_ECC
MTD_NAND_ECC selects MTD_NAND_CORE
In this case MTD_NAND_CORE=m is "valid" but will trigger link errors
such as the one below.

The problem does not directly come from that patchset but more on
the way dependencies are described under drivers/mtd/nand/. I will fix
this in another patch and apply it right before merging this series on
top of the spi-mem-ecc branch to avoid any further reports.

> 
> 
> vim +688 drivers/spi/spi-mxic.c
> 
>    683	
>    684	static void mxic_spi_mem_ecc_remove(struct mxic_spi *mxic)
>    685	{
>    686		if (mxic->ecc.pipelined_engine) {
>    687			mxic_ecc_put_pipelined_engine(mxic->ecc.pipelined_engine);
>  > 688			nand_ecc_unregister_on_host_hw_engine(mxic->ecc.pipelined_engine);  
>    689		}
>    690	}
>    691	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org


Thanks,
Miquèl

      reply	other threads:[~2022-01-28 17:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 13:01 [mtd:spi-mem-ecc 29/29] drivers/spi/spi-mxic.c:688: undefined reference to `nand_ecc_unregister_on_host_hw_engine' kernel test robot
2022-01-28 17:05 ` Miquel Raynal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220128180510.51d304ea@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.