tree:
git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: b26f403d01870360392f2fe778304d3a8cba0bef
commit: d5ba15e3647df3f2bece61d36cca4a536939623b [4081/13420] dma-buf: heaps: Add Carveout
heap to dmabuf heaps
config: x86_64-randconfig-r036-20210316 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
50c7504a93fdb90c26870db8c8ea7add895c7725)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add ti
git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-linux-5.4.y
git checkout d5ba15e3647df3f2bece61d36cca4a536939623b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/dma-buf/heaps/carveout-heap.c:249:5: warning: no previous
prototype for function 'carveout_dma_heap_export' [-Wmissing-prototypes]
int carveout_dma_heap_export(phys_addr_t base, size_t size, const char *name)
^
drivers/dma-buf/heaps/carveout-heap.c:249:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
int carveout_dma_heap_export(phys_addr_t base, size_t size, const char *name)
^
static
1 warning generated.
vim +/carveout_dma_heap_export +249 drivers/dma-buf/heaps/carveout-heap.c
248
249 int carveout_dma_heap_export(phys_addr_t base, size_t size, const
char *name)
250 {
251 struct carveout_dma_heap *carveout_dma_heap;
252 struct dma_heap_export_info exp_info;
253 int ret;
254
255 carveout_dma_heap = kzalloc(sizeof(*carveout_dma_heap), GFP_KERNEL);
256 if (!carveout_dma_heap)
257 return -ENOMEM;
258
259 carveout_dma_heap->pool = gen_pool_create(PAGE_SHIFT, NUMA_NO_NODE);
260 if (IS_ERR(carveout_dma_heap->pool)) {
261 pr_err("Carveout Heap: Could not create memory pool\n");
262 ret = PTR_ERR(carveout_dma_heap->pool);
263 goto free_carveout_dma_heap;
264 }
265 ret = gen_pool_add(carveout_dma_heap->pool, base, size, NUMA_NO_NODE);
266 if (ret) {
267 pr_err("Carveout Heap: Could not add memory to pool\n");
268 goto free_pool;
269 }
270
271 exp_info.name = name;
272 exp_info.ops = &carveout_dma_heap_ops;
273 exp_info.priv = carveout_dma_heap;
274 carveout_dma_heap->heap = dma_heap_add(&exp_info);
275 if (IS_ERR(carveout_dma_heap->heap)) {
276 pr_err("Carveout Heap: Could not add DMA-Heap\n");
277 ret = PTR_ERR(carveout_dma_heap->heap);
278 goto free_pool;
279 }
280
281 pr_info("Carveout Heap: Exported %zu MiB at %pa\n", size / SZ_1M,
&base);
282
283 return 0;
284
285 free_pool:
286 gen_pool_destroy(carveout_dma_heap->pool);
287 free_carveout_dma_heap:
288 kfree(carveout_dma_heap);
289 return ret;
290 }
291
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org