tree:
git://git.infradead.org/users/hch/block.git dma-ranges.3
head: cbf6ef97bdb2a2ccc73ba09d2f6a744fe5423a52
commit: cbf6ef97bdb2a2ccc73ba09d2f6a744fe5423a52 [9/9] dma-mapping: introduce DMA range
map, supplanting dma_pfn_offset
config: mips-randconfig-r034-20200909 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
0a5dc7effb191eff740e0e7ae7bd8e1f6bdb3ad9)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git checkout cbf6ef97bdb2a2ccc73ba09d2f6a744fe5423a52
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/remoteproc/remoteproc_core.c:469:17: error: incomplete
definition of type 'struct bus_dma_region'
for (r = map;
r->size; r++)
~^
include/linux/device.h:564:15: note: forward declaration of 'struct
bus_dma_region'
const struct bus_dma_region *dma_range_map;
^
> drivers/remoteproc/remoteproc_core.c:469:26: error: arithmetic on
a pointer to an incomplete type 'const struct bus_dma_region'
for
(r = map; r->size; r++)
~^
include/linux/device.h:564:15: note: forward declaration of 'struct
bus_dma_region'
const struct bus_dma_region *dma_range_map;
^
> drivers/remoteproc/remoteproc_core.c:472:58: error: invalid
application of 'sizeof' to an incomplete type 'const struct
bus_dma_region'
new_map = kmemdup(map, array_size(num_ranges + 1,
sizeof(*map)),
^~~~~~
include/linux/device.h:564:15: note: forward declaration of 'struct
bus_dma_region'
const struct bus_dma_region *dma_range_map;
^
3 errors generated.
git remote add hch-block
git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block dma-ranges.3
git checkout cbf6ef97bdb2a2ccc73ba09d2f6a744fe5423a52
vim +469 drivers/remoteproc/remoteproc_core.c
460
461 static int copy_dma_range_map(struct device *to, struct device *from)
462 {
463 const struct bus_dma_region *map = from->dma_range_map, *new_map, *r;
464 int num_ranges = 0;
465
466 if (!map)
467 return 0;
468
469 for (r = map; r->size; r++)
470 num_ranges++;
471
472 new_map = kmemdup(map, array_size(num_ranges + 1, sizeof(*map)),
473 GFP_KERNEL);
474 if (!new_map)
475 return -ENOMEM;
476 to->dma_range_map = new_map;
477 return 0;
478 }
479
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org