[soc:multiplatform/cleanup 3/5] drivers/pci/pci.c:4291: undefined reference to `pci_remap_iospace'

kernel test robot lkp at intel.com
Sun Sep 18 21:18:00 PDT 2022


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git multiplatform/cleanup
head:   84fc863606239d8b434e59e6bbbe805f457e5767
commit: 6fd09c9afa49b343d17cecedd7879d097f37f2a9 [3/5] ARM: Kconfig: clean up platform selection
config: arm-randconfig-r031-20220919 (https://download.01.org/0day-ci/archive/20220919/202209191235.BfrBz8er-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/soc/soc.git/commit/?id=6fd09c9afa49b343d17cecedd7879d097f37f2a9
        git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
        git fetch --no-tags soc multiplatform/cleanup
        git checkout 6fd09c9afa49b343d17cecedd7879d097f37f2a9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   arm-linux-gnueabi-ld: drivers/pci/pci.o: in function `devm_pci_remap_iospace':
>> drivers/pci/pci.c:4291: undefined reference to `pci_remap_iospace'
   arm-linux-gnueabi-ld: drivers/pcmcia/at91_cf.o: in function `at91_cf_probe':
>> drivers/pcmcia/at91_cf.c:314: undefined reference to `pci_remap_iospace'


vim +4291 drivers/pci/pci.c

a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4271  
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4272  /**
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4273   * devm_pci_remap_iospace - Managed pci_remap_iospace()
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4274   * @dev: Generic device to remap IO address for
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4275   * @res: Resource describing the I/O space
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4276   * @phys_addr: physical address of range to be mapped
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4277   *
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4278   * Managed pci_remap_iospace().  Map is automatically unmapped on driver
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4279   * detach.
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4280   */
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4281  int devm_pci_remap_iospace(struct device *dev, const struct resource *res,
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4282  			   phys_addr_t phys_addr)
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4283  {
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4284  	const struct resource **ptr;
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4285  	int error;
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4286  
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4287  	ptr = devres_alloc(devm_pci_unmap_iospace, sizeof(*ptr), GFP_KERNEL);
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4288  	if (!ptr)
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4289  		return -ENOMEM;
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4290  
a5fb9fb023a143 Sergei Shtylyov 2018-07-18 @4291  	error = pci_remap_iospace(res, phys_addr);
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4292  	if (error) {
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4293  		devres_free(ptr);
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4294  	} else	{
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4295  		*ptr = res;
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4296  		devres_add(dev, ptr);
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4297  	}
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4298  
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4299  	return error;
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4300  }
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4301  EXPORT_SYMBOL(devm_pci_remap_iospace);
a5fb9fb023a143 Sergei Shtylyov 2018-07-18  4302  

:::::: The code at line 4291 was first introduced by commit
:::::: a5fb9fb023a1435f2b42bccd7f547560f3a21dc3 PCI: OF: Fix I/O space page leak

:::::: TO: Sergei Shtylyov <sergei.shtylyov at cogentembedded.com>
:::::: CC: Bjorn Helgaas <helgaas at kernel.org>

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



More information about the linux-arm-kernel mailing list