* [chrome-os:chromeos-6.6 0/8] drivers/dma-buf/heaps/restricted_heap_mtk.c:537:6: error: call to undeclared function 'of_get_flat_dt_prop'; ISO C99 and later do not support implicit function declarations
@ 2025-02-23 0:13 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-23 0:13 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-6.6
head: 1fccbaa220247bcecbab7873df408563a5a4344f
commit: cebde616e78fae2ba1d76a7dd61392c07ed375ec [0/8] CHROMIUM: dma-buf: heaps: mtk_restricted: Add carveout memory support
config: i386-randconfig-051-20250223 (https://download.01.org/0day-ci/archive/20250223/202502230804.ZFViXboa-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250223/202502230804.ZFViXboa-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502230804.ZFViXboa-lkp@intel.com/
Note: the chrome-os/chromeos-6.6 HEAD 1fccbaa220247bcecbab7873df408563a5a4344f builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
drivers/dma-buf/heaps/restricted_heap_mtk.c:234:52: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
233 | pr_err("%s: failed used 0x%x total_size 0x%lx needed 0x%lx\n",
| ~~~
| %zx
234 | __func__, data->cma_used_size, heap->resv_size, buf->size);
| ^~~~~~~~~
include/linux/printk.h:498:33: note: expanded from macro 'pr_err'
498 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:455:60: note: expanded from macro 'printk'
455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap'
427 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
drivers/dma-buf/heaps/restricted_heap_mtk.c:371:34: error: call to undeclared function 'phys_to_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
371 | sg_set_page(buf->sg_table.sgl, phys_to_page(pa_tee), buf->size, 0);
| ^
drivers/dma-buf/heaps/restricted_heap_mtk.c:371:34: note: did you mean 'phys_to_virt'?
arch/x86/include/asm/io.h:147:21: note: 'phys_to_virt' declared here
147 | static inline void *phys_to_virt(phys_addr_t address)
| ^
drivers/dma-buf/heaps/restricted_heap_mtk.c:371:34: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion]
371 | sg_set_page(buf->sg_table.sgl, phys_to_page(pa_tee), buf->size, 0);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/scatterlist.h:136:69: note: passing argument to parameter 'page' here
136 | static inline void sg_set_page(struct scatterlist *sg, struct page *page,
| ^
drivers/dma-buf/heaps/restricted_heap_mtk.c:409:19: error: call to undeclared function 'phys_to_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
409 | sg_set_page(sg, phys_to_page(tee_sg_item->pa),
| ^
drivers/dma-buf/heaps/restricted_heap_mtk.c:409:19: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion]
409 | sg_set_page(sg, phys_to_page(tee_sg_item->pa),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/scatterlist.h:136:69: note: passing argument to parameter 'page' here
136 | static inline void sg_set_page(struct scatterlist *sg, struct page *page,
| ^
>> drivers/dma-buf/heaps/restricted_heap_mtk.c:537:6: error: call to undeclared function 'of_get_flat_dt_prop'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
537 | if (of_get_flat_dt_prop(node, "reusable", NULL)) {
| ^
1 warning and 5 errors generated.
vim +/of_get_flat_dt_prop +537 drivers/dma-buf/heaps/restricted_heap_mtk.c
523
524 static int __init mtk_restricted_resv_init(struct reserved_mem *rmem)
525 {
526 struct restricted_heap *rheap = mtk_restricted_heaps, *rheap_resv = NULL;
527 struct mtk_restricted_heap_data *data;
528 unsigned long node = rmem->fdt_node;
529 struct cma *cma = NULL;
530 int ret, i;
531
532 /* If restricted_region in the device tree has the 'reusable' attribute,
533 * it uses CMA to dynamically allocate memory. If restricted_region has
534 * the 'no-map' attribute, it uses carveout memory. This depends on the
535 * platform configuration.
536 */
> 537 if (of_get_flat_dt_prop(node, "reusable", NULL)) {
538 ret = cma_init_reserved_mem(rmem->base, rmem->size, 0, rmem->name, &cma);
539 if (ret || !cma) {
540 pr_err("%s: %s set up CMA fail. ret %d.\n", __func__, rmem->name, ret);
541 return ret;
542 }
543 }
544
545 for (i = 0; i < ARRAY_SIZE(mtk_restricted_heaps); i++, rheap++) {
546 data = rheap->priv_data;
547 if (data->mem_type == MTK_SECURE_MEMORY_TYPE_CM_CMA) {
548 rheap_resv = rheap;
549 rheap_resv->cma = cma;
550 if (!cma)
551 data->is_carveout = true;
552 break;
553 }
554 }
555 if (!rheap_resv)
556 return -EINVAL;
557
558 rheap_resv->resv_paddr = rmem->base;
559 rheap_resv->resv_size = rmem->size;
560 return 0;
561 }
562
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-23 0:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-23 0:13 [chrome-os:chromeos-6.6 0/8] drivers/dma-buf/heaps/restricted_heap_mtk.c:537:6: error: call to undeclared function 'of_get_flat_dt_prop'; ISO C99 and later do not support implicit function declarations kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.