All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 562/11283] drivers/gpu/drm/drm_gem_shmem_helper.c:261:17: error: implicit declaration of function 'pgprot_writecombine'
Date: Sun, 26 Jan 2020 07:22:46 +0800	[thread overview]
Message-ID: <202001260738.vFVALst2%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5304 bytes --]

Hi Thomas,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   702ccea170f07783bd002055a353a0866c062267
commit: 08b22f65b309649057edfbae1d8772b04210b486 [562/11283] drm/udl: Switch to SHMEM
config: m68k-randconfig-a001-20200126 (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 08b22f65b309649057edfbae1d8772b04210b486
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_vmap_locked':
>> drivers/gpu/drm/drm_gem_shmem_helper.c:261:17: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
            VM_MAP, pgprot_writecombine(PAGE_KERNEL));
                    ^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_gem_shmem_helper.c:261:17: error: incompatible type for argument 4 of 'vmap'
   In file included from include/asm-generic/io.h:887:0,
                    from arch/m68k/include/asm/io.h:11,
                    from arch/m68k/include/asm/pgtable_no.h:14,
                    from arch/m68k/include/asm/pgtable.h:3,
                    from include/linux/mm.h:99,
                    from include/linux/scatterlist.h:8,
                    from include/linux/dma-buf.h:18,
                    from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
   include/linux/vmalloc.h:119:14: note: expected 'pgprot_t {aka struct <anonymous>}' but argument is of type 'int'
    extern void *vmap(struct page **pages, unsigned int count,
                 ^~~~
   drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_mmap':
>> drivers/gpu/drm/drm_gem_shmem_helper.c:540:20: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
     vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
                       ^
   cc1: some warnings being treated as errors

vim +/pgprot_writecombine +261 drivers/gpu/drm/drm_gem_shmem_helper.c

2194a63a818db7 Noralf Trønnes  2019-03-12  244  
2194a63a818db7 Noralf Trønnes  2019-03-12  245  static void *drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object *shmem)
2194a63a818db7 Noralf Trønnes  2019-03-12  246  {
2194a63a818db7 Noralf Trønnes  2019-03-12  247  	struct drm_gem_object *obj = &shmem->base;
2194a63a818db7 Noralf Trønnes  2019-03-12  248  	int ret;
2194a63a818db7 Noralf Trønnes  2019-03-12  249  
2194a63a818db7 Noralf Trønnes  2019-03-12  250  	if (shmem->vmap_use_count++ > 0)
2194a63a818db7 Noralf Trønnes  2019-03-12  251  		return shmem->vaddr;
2194a63a818db7 Noralf Trønnes  2019-03-12  252  
2194a63a818db7 Noralf Trønnes  2019-03-12  253  	ret = drm_gem_shmem_get_pages(shmem);
2194a63a818db7 Noralf Trønnes  2019-03-12  254  	if (ret)
2194a63a818db7 Noralf Trønnes  2019-03-12  255  		goto err_zero_use;
2194a63a818db7 Noralf Trønnes  2019-03-12  256  
2194a63a818db7 Noralf Trønnes  2019-03-12  257  	if (obj->import_attach)
2194a63a818db7 Noralf Trønnes  2019-03-12  258  		shmem->vaddr = dma_buf_vmap(obj->import_attach->dmabuf);
2194a63a818db7 Noralf Trønnes  2019-03-12  259  	else
be7d9f05c53e6f Boris Brezillon 2019-05-29  260  		shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
be7d9f05c53e6f Boris Brezillon 2019-05-29 @261  				    VM_MAP, pgprot_writecombine(PAGE_KERNEL));
2194a63a818db7 Noralf Trønnes  2019-03-12  262  
2194a63a818db7 Noralf Trønnes  2019-03-12  263  	if (!shmem->vaddr) {
2194a63a818db7 Noralf Trønnes  2019-03-12  264  		DRM_DEBUG_KMS("Failed to vmap pages\n");
2194a63a818db7 Noralf Trønnes  2019-03-12  265  		ret = -ENOMEM;
2194a63a818db7 Noralf Trønnes  2019-03-12  266  		goto err_put_pages;
2194a63a818db7 Noralf Trønnes  2019-03-12  267  	}
2194a63a818db7 Noralf Trønnes  2019-03-12  268  
2194a63a818db7 Noralf Trønnes  2019-03-12  269  	return shmem->vaddr;
2194a63a818db7 Noralf Trønnes  2019-03-12  270  
2194a63a818db7 Noralf Trønnes  2019-03-12  271  err_put_pages:
2194a63a818db7 Noralf Trønnes  2019-03-12  272  	drm_gem_shmem_put_pages(shmem);
2194a63a818db7 Noralf Trønnes  2019-03-12  273  err_zero_use:
2194a63a818db7 Noralf Trønnes  2019-03-12  274  	shmem->vmap_use_count = 0;
2194a63a818db7 Noralf Trønnes  2019-03-12  275  
2194a63a818db7 Noralf Trønnes  2019-03-12  276  	return ERR_PTR(ret);
2194a63a818db7 Noralf Trønnes  2019-03-12  277  }
2194a63a818db7 Noralf Trønnes  2019-03-12  278  

:::::: The code at line 261 was first introduced by commit
:::::: be7d9f05c53e6fc88525f8e55cf2dae937761799 drm/gem_shmem: Use a writecombine mapping for ->vaddr

:::::: TO: Boris Brezillon <boris.brezillon@collabora.com>
:::::: CC: Rob Herring <robh@kernel.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23315 bytes --]

                 reply	other threads:[~2020-01-25 23:22 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=202001260738.vFVALst2%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.