From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Sun, 23 Feb 2025 08:13:12 +0800 [thread overview]
Message-ID: <202502230804.ZFViXboa-lkp@intel.com> (raw)
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
reply other threads:[~2025-02-23 0:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502230804.ZFViXboa-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.