tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-linus head: d98e6dbf42f73101128885a1e0ae672cd92b2e1a commit: d98e6dbf42f73101128885a1e0ae672cd92b2e1a [3/3] staging: ion: Fix ion_cma_heap allocations config: i386-randconfig-x019-12132053 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: git checkout d98e6dbf42f73101128885a1e0ae672cd92b2e1a # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/staging//android/ion/ion_cma_heap.c: In function 'ion_cma_allocate':
>> drivers/staging//android/ion/ion_cma_heap.c:47:14: error:
>> 'CONFIG_CMA_ALIGNMENT' undeclared (first use in this function); did you mean
>> 'CONFIG_CMA_AREAS'?
if (align > CONFIG_CMA_ALIGNMENT)
^~~~~~~~~~~~~~~~~~~~
CONFIG_CMA_AREAS
drivers/staging//android/ion/ion_cma_heap.c:47:14: note: each undeclared
identifier is reported only once for each function it appears in
vim +47 drivers/staging//android/ion/ion_cma_heap.c
33
34 /* ION CMA heap operations functions */
35 static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer
*buffer,
36 unsigned long len,
37 unsigned long flags)
38 {
39 struct ion_cma_heap *cma_heap = to_cma_heap(heap);
40 struct sg_table *table;
41 struct page *pages;
42 unsigned long size = PAGE_ALIGN(len);
43 unsigned long nr_pages = size >> PAGE_SHIFT;
44 unsigned long align = get_order(size);
45 int ret;
46
> 47 if (align > CONFIG_CMA_ALIGNMENT)
48 align = CONFIG_CMA_ALIGNMENT;
49
50 pages = cma_alloc(cma_heap->cma, nr_pages, align, GFP_KERNEL);
51 if (!pages)
52 return -ENOMEM;
53
54 table = kmalloc(sizeof(*table), GFP_KERNEL);
55 if (!table)
56 goto err;
57
58 ret = sg_alloc_table(table, 1, GFP_KERNEL);
59 if (ret)
60 goto free_mem;
61
62 sg_set_page(table->sgl, pages, size, 0);
63
64 buffer->priv_virt = pages;
65 buffer->sg_table = table;
66 return 0;
67
68 free_mem:
69 kfree(table);
70 err:
71 cma_release(cma_heap->cma, pages, nr_pages);
72 return -ENOMEM;
73 }
74
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip
_______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
