All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Markus Stockhausen <markus.stockhausen@gmx.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Miquel Raynal <miquel.raynal@bootlin.com>
Subject: drivers/mtd/nand/ecc-realtek.c:443:undefined reference to `dma_free_pages'
Date: Fri, 7 Nov 2025 11:39:11 +0800	[thread overview]
Message-ID: <202511071114.8WeW2GZK-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4a0c9b3391999818e2c5b93719699b255be1f682
commit: 3148d0e5b1c5733d69ec51b70c8280e46488750a mtd: nand: realtek-ecc: Add Realtek external ECC engine support
date:   6 weeks ago
config: sh-randconfig-r121-20251107 (https://download.01.org/0day-ci/archive/20251107/202511071114.8WeW2GZK-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251107/202511071114.8WeW2GZK-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511071114.8WeW2GZK-lkp@intel.com/

All errors (new ones prefixed by >>):

   sh4-linux-ld: drivers/mtd/nand/ecc-realtek.o: in function `rtl_ecc_remove':
>> drivers/mtd/nand/ecc-realtek.c:443:(.text+0x1f8): undefined reference to `dma_free_pages'
   sh4-linux-ld: drivers/mtd/nand/ecc-realtek.o: in function `rtl_ecc_probe':
>> drivers/mtd/nand/ecc-realtek.c:434:(.text+0x2e8): undefined reference to `dma_alloc_pages'
   sh4-linux-ld: drivers/media/i2c/tc358746.o: in function `tc358746_probe':
   drivers/media/i2c/tc358746.c:1585:(.text+0x15cc): undefined reference to `devm_clk_hw_register'
   sh4-linux-ld: drivers/media/i2c/tc358746.c:1610:(.text+0x163c): undefined reference to `devm_of_clk_add_hw_provider'
   sh4-linux-ld: drivers/media/i2c/tc358746.c:1610:(.text+0x1640): undefined reference to `of_clk_hw_simple_get'


vim +443 drivers/mtd/nand/ecc-realtek.c

   389	
   390	static int rtl_ecc_probe(struct platform_device *pdev)
   391	{
   392		struct device *dev = &pdev->dev;
   393		struct rtl_ecc_engine *rtlc;
   394		void __iomem *base;
   395		int ret;
   396	
   397		rtlc = devm_kzalloc(dev, sizeof(*rtlc), GFP_KERNEL);
   398		if (!rtlc)
   399			return -ENOMEM;
   400	
   401		base = devm_platform_ioremap_resource(pdev, 0);
   402		if (IS_ERR(base))
   403			return PTR_ERR(base);
   404	
   405		ret = devm_mutex_init(dev, &rtlc->lock);
   406		if (ret)
   407			return ret;
   408	
   409		rtlc->regmap = devm_regmap_init_mmio(dev, base, &rtl_ecc_regmap_config);
   410		if (IS_ERR(rtlc->regmap))
   411			return PTR_ERR(rtlc->regmap);
   412	
   413		/*
   414		 * Focus on simplicity and use a preallocated DMA buffer for data exchange with the
   415		 * engine. For now make it a noncoherent memory model as invalidating/flushing caches
   416		 * is faster than reading/writing uncached memory on the known architectures.
   417		 */
   418	
   419		rtlc->buf = dma_alloc_noncoherent(dev, RTL_ECC_DMA_SIZE, &rtlc->buf_dma,
   420						  DMA_BIDIRECTIONAL, GFP_KERNEL);
   421		if (IS_ERR(rtlc->buf))
   422			return PTR_ERR(rtlc->buf);
   423	
   424		rtlc->dev = dev;
   425		rtlc->engine.dev = dev;
   426		rtlc->engine.ops = &rtl_ecc_engine_ops;
   427		rtlc->engine.integration = NAND_ECC_ENGINE_INTEGRATION_EXTERNAL;
   428	
   429		nand_ecc_register_on_host_hw_engine(&rtlc->engine);
   430	
   431		platform_set_drvdata(pdev, rtlc);
   432	
   433		return 0;
 > 434	}
   435	
   436	static void rtl_ecc_remove(struct platform_device *pdev)
   437	{
   438		struct rtl_ecc_engine *rtlc = platform_get_drvdata(pdev);
   439	
   440		nand_ecc_unregister_on_host_hw_engine(&rtlc->engine);
   441		dma_free_noncoherent(rtlc->dev, RTL_ECC_DMA_SIZE, rtlc->buf, rtlc->buf_dma,
   442				     DMA_BIDIRECTIONAL);
 > 443	}
   444	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2025-11-07  3:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07  3:39 kernel test robot [this message]
2025-11-07 10:31 ` AW: drivers/mtd/nand/ecc-realtek.c:443:undefined reference to `dma_free_pages' markus.stockhausen
2025-11-19 19:27   ` Miquel Raynal

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=202511071114.8WeW2GZK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.stockhausen@gmx.de \
    --cc=miquel.raynal@bootlin.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.