tree: https://github.com/Freescale/linux-fslc 5.15-2.1.x-imx head: c4c56565f9a812fafee843d7a7248f4991a6b709 commit: 371963361b09c8020212056cd797d23dd98a10be [14450/18019] LF-6285-1 npu: ethosu: Add Arm ethos-u driver config: mips-randconfig-m031-20221206 compiler: mips64-linux-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://github.com/Freescale/linux-fslc/commit/371963361b09c8020212056cd797d23dd98a10be git remote add freescale-fslc https://github.com/Freescale/linux-fslc git fetch --no-tags freescale-fslc 5.15-2.1.x-imx git checkout 371963361b09c8020212056cd797d23dd98a10be # 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=mips SHELL=/bin/bash drivers/staging/ethosu/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/staging/ethosu/ethosu_buffer.c: In function 'ethosu_buffer_dma_ranges': >> drivers/staging/ethosu/ethosu_buffer.c:104:25: error: implicit declaration of function 'of_read_number' [-Werror=implicit-function-declaration] 104 | daddr = of_read_number(&ranges[i], naddr); | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/of_read_number +104 drivers/staging/ethosu/ethosu_buffer.c 59 60 /**************************************************************************** 61 * Functions 62 ****************************************************************************/ 63 64 /* 65 * The 'dma-ranges' device tree property for shared dma memory does not seem 66 * to be fully supported for coherent memory. Therefor we apply the DMA range 67 * offset ourselves. 68 */ 69 static dma_addr_t ethosu_buffer_dma_ranges(struct device *dev, 70 dma_addr_t dma_addr, 71 size_t dma_buf_size) 72 { 73 struct device_node *node = dev->of_node; 74 const __be32 *ranges; 75 int len; 76 int naddr; 77 int nsize; 78 int inc; 79 int i; 80 81 if (!node) 82 return dma_addr; 83 84 /* Get the #address-cells and #size-cells properties */ 85 naddr = of_n_addr_cells(node); 86 nsize = of_n_size_cells(node); 87 88 /* Read the 'dma-ranges' property */ 89 ranges = of_get_property(node, "dma-ranges", &len); 90 if (!ranges || len <= 0) 91 return dma_addr; 92 93 dev_dbg(dev, "ranges=%p, len=%d, naddr=%d, nsize=%d\n", 94 ranges, len, naddr, nsize); 95 96 len /= sizeof(*ranges); 97 inc = naddr + naddr + nsize; 98 99 for (i = 0; (i + inc) <= len; i += inc) { 100 dma_addr_t daddr; 101 dma_addr_t paddr; 102 dma_addr_t size; 103 > 104 daddr = of_read_number(&ranges[i], naddr); 105 paddr = of_read_number(&ranges[i + naddr], naddr); 106 size = of_read_number(&ranges[i + naddr + naddr], nsize); 107 108 dev_dbg(dev, "daddr=0x%llx, paddr=0x%llx, size=0x%llx\n", 109 daddr, paddr, size); 110 111 if (dma_addr >= paddr && 112 (dma_addr + dma_buf_size) < (paddr + size)) 113 return dma_addr + daddr - paddr; 114 } 115 116 return dma_addr; 117 } 118 -- 0-DAY CI Kernel Test Service https://01.org/lkp