public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jens Wiklander <jens.wiklander@linaro.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Sat, 19 Oct 2024 01:53:25 +0800	[thread overview]
Message-ID: <202410190146.hY3MF4rH-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-10-18 17:53 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=202410190146.hY3MF4rH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jens.wiklander@linaro.org \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox