* [jens-wiklander-tee:testing/tuxbuild 1/2] drivers/tee/tee_rstmem.c:40:29: error: call to undeclared function 'phys_to_page'; ISO C99 and later do not support implicit function declarations
@ 2024-10-18 17:53 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-18 17:53 UTC (permalink / raw)
To: Jens Wiklander; +Cc: llvm, oe-kbuild-all
tree: http://git.linaro.org/people/jens.wiklander/linux-tee testing/tuxbuild
head: 971e80da23e2fbfd044ec231e75a61dfeb6ce61a
commit: bc4386e9f6899baeaf60b57076495f2336c1f7f7 [1/2] tee: add restricted memory allocation
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241019/202410190146.hY3MF4rH-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241019/202410190146.hY3MF4rH-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/202410190146.hY3MF4rH-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/tee/tee_rstmem.c:40:29: error: call to undeclared function 'phys_to_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
40 | sg_set_page(a->table.sgl, phys_to_page(shm->paddr), shm->size,
| ^
drivers/tee/tee_rstmem.c:40:29: note: did you mean 'phys_to_virt'?
arch/x86/include/asm/io.h:148:21: note: 'phys_to_virt' declared here
148 | static inline void *phys_to_virt(phys_addr_t address)
| ^
>> drivers/tee/tee_rstmem.c:40:29: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion]
40 | sg_set_page(a->table.sgl, phys_to_page(shm->paddr), shm->size,
| ^~~~~~~~~~~~~~~~~~~~~~~~
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,
| ^
2 errors generated.
vim +/phys_to_page +40 drivers/tee/tee_rstmem.c
17
18 static int rstmem_dma_attach(struct dma_buf *dmabuf,
19 struct dma_buf_attachment *attachment)
20 {
21 struct tee_shm *shm = dmabuf->priv;
22 struct tee_rstmem_attachment *a;
23 int rc;
24
25 a = kzalloc(sizeof(*a), GFP_KERNEL);
26 if (!a)
27 return -ENOMEM;
28
29 if (shm->pages) {
30 rc = sg_alloc_table_from_pages(&a->table, shm->pages,
31 shm->num_pages, 0,
32 shm->num_pages * PAGE_SIZE,
33 GFP_KERNEL);
34 if (rc)
35 goto err;
36 } else {
37 rc = sg_alloc_table(&a->table, 1, GFP_KERNEL);
38 if (rc)
39 goto err;
> 40 sg_set_page(a->table.sgl, phys_to_page(shm->paddr), shm->size,
41 0);
42 }
43
44 a->dev = attachment->dev;
45 attachment->priv = a;
46
47 return 0;
48 err:
49 kfree(a);
50 return rc;
51 }
52
--
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:[~2024-10-18 17:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 17:53 [jens-wiklander-tee:testing/tuxbuild 1/2] drivers/tee/tee_rstmem.c:40:29: error: call to undeclared function 'phys_to_page'; ISO C99 and later do not support implicit function declarations kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox