[arm-platforms:hack/m1-pcie 78/99] drivers/of/address.c:903:10: error: implicit declaration of function 'ioremap_np'; did you mean 'ioremap_wt'?

kernel test robot lkp at intel.com
Sat Apr 3 19:16:32 BST 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/m1-pcie
head:   1fd2c9634dd24fba323baba52200de18e4d3f4ee
commit: 270af822bb6aeba92e99d8b5a6b6645b5dc8ce03 [78/99] of/address: Add infrastructure to declare MMIO as non-posted
config: powerpc-mpc8540_ads_defconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.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/maz/arm-platforms.git/commit/?id=270af822bb6aeba92e99d8b5a6b6645b5dc8ce03
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms hack/m1-pcie
        git checkout 270af822bb6aeba92e99d8b5a6b6645b5dc8ce03
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

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

All error/warnings (new ones prefixed by >>):

   drivers/of/address.c: In function 'of_iomap':
>> drivers/of/address.c:903:10: error: implicit declaration of function 'ioremap_np'; did you mean 'ioremap_wt'? [-Werror=implicit-function-declaration]
     903 |   return ioremap_np(res.start, resource_size(&res));
         |          ^~~~~~~~~~
         |          ioremap_wt
>> drivers/of/address.c:903:10: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
     903 |   return ioremap_np(res.start, resource_size(&res));
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/of/address.c: In function 'of_io_request_and_map':
>> drivers/of/address.c:938:7: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     938 |   mem = ioremap_np(res.start, resource_size(&res));
         |       ^
   cc1: some warnings being treated as errors


vim +903 drivers/of/address.c

   887	
   888	/**
   889	 * of_iomap - Maps the memory mapped IO for a given device_node
   890	 * @np:		the device whose io range will be mapped
   891	 * @index:	index of the io range
   892	 *
   893	 * Returns a pointer to the mapped memory
   894	 */
   895	void __iomem *of_iomap(struct device_node *np, int index)
   896	{
   897		struct resource res;
   898	
   899		if (of_address_to_resource(np, index, &res))
   900			return NULL;
   901	
   902		if (res.flags & IORESOURCE_MEM_NONPOSTED)
 > 903			return ioremap_np(res.start, resource_size(&res));
   904		else
   905			return ioremap(res.start, resource_size(&res));
   906	}
   907	EXPORT_SYMBOL(of_iomap);
   908	
   909	/*
   910	 * of_io_request_and_map - Requests a resource and maps the memory mapped IO
   911	 *			   for a given device_node
   912	 * @device:	the device whose io range will be mapped
   913	 * @index:	index of the io range
   914	 * @name:	name "override" for the memory region request or NULL
   915	 *
   916	 * Returns a pointer to the requested and mapped memory or an ERR_PTR() encoded
   917	 * error code on failure. Usage example:
   918	 *
   919	 *	base = of_io_request_and_map(node, 0, "foo");
   920	 *	if (IS_ERR(base))
   921	 *		return PTR_ERR(base);
   922	 */
   923	void __iomem *of_io_request_and_map(struct device_node *np, int index,
   924					    const char *name)
   925	{
   926		struct resource res;
   927		void __iomem *mem;
   928	
   929		if (of_address_to_resource(np, index, &res))
   930			return IOMEM_ERR_PTR(-EINVAL);
   931	
   932		if (!name)
   933			name = res.name;
   934		if (!request_mem_region(res.start, resource_size(&res), name))
   935			return IOMEM_ERR_PTR(-EBUSY);
   936	
   937		if (res.flags & IORESOURCE_MEM_NONPOSTED)
 > 938			mem = ioremap_np(res.start, resource_size(&res));
   939		else
   940			mem = ioremap(res.start, resource_size(&res));
   941	
   942		if (!mem) {
   943			release_mem_region(res.start, resource_size(&res));
   944			return IOMEM_ERR_PTR(-ENOMEM);
   945		}
   946	
   947		return mem;
   948	}
   949	EXPORT_SYMBOL(of_io_request_and_map);
   950	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 12600 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210404/5a00bae3/attachment.gz>


More information about the linux-arm-kernel mailing list