[ragnatech:media-tree 141/170] drivers/pci/mmap.c:57:23: error: implicit declaration of function 'pgprot_device'; did you mean 'put_device'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mauro,

First bad commit (maybe != root cause):

tree:   git://git.ragnatech.se/linux media-tree
head:   ceab3ac1e60d70afb4e25147d60817c513f235f7
commit: df823a8208c434eee6e4e9aa016c956d0968e2e2 [141/170] media: cec: rename CEC platform drivers config options
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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 df823a8208c434eee6e4e9aa016c956d0968e2e2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/pci/mmap.c: In function 'pci_mmap_resource_range':
>> drivers/pci/mmap.c:57:23: error: implicit declaration of function 'pgprot_device'; did you mean 'put_device'? [-Werror=implicit-function-declaration]
      57 |   vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
         |                       ^~~~~~~~~~~~~
         |                       put_device
>> drivers/pci/mmap.c:57:23: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
   cc1: some warnings being treated as errors

vim +57 drivers/pci/mmap.c

f719582435afe9 David Woodhouse 2017-04-12  42  
f719582435afe9 David Woodhouse 2017-04-12  43  int pci_mmap_resource_range(struct pci_dev *pdev, int bar,
f719582435afe9 David Woodhouse 2017-04-12  44  			    struct vm_area_struct *vma,
f719582435afe9 David Woodhouse 2017-04-12  45  			    enum pci_mmap_state mmap_state, int write_combine)
f719582435afe9 David Woodhouse 2017-04-12  46  {
f719582435afe9 David Woodhouse 2017-04-12  47  	unsigned long size;
2bea36fd1af440 David Woodhouse 2017-04-12  48  	int ret;
f719582435afe9 David Woodhouse 2017-04-12  49  
f719582435afe9 David Woodhouse 2017-04-12  50  	size = ((pci_resource_len(pdev, bar) - 1) >> PAGE_SHIFT) + 1;
f719582435afe9 David Woodhouse 2017-04-12  51  	if (vma->vm_pgoff + vma_pages(vma) > size)
f719582435afe9 David Woodhouse 2017-04-12  52  		return -EINVAL;
f719582435afe9 David Woodhouse 2017-04-12  53  
f719582435afe9 David Woodhouse 2017-04-12  54  	if (write_combine)
f719582435afe9 David Woodhouse 2017-04-12  55  		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
f719582435afe9 David Woodhouse 2017-04-12  56  	else
f719582435afe9 David Woodhouse 2017-04-12 @57  		vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
f719582435afe9 David Woodhouse 2017-04-12  58  
2bea36fd1af440 David Woodhouse 2017-04-12  59  	if (mmap_state == pci_mmap_io) {
2bea36fd1af440 David Woodhouse 2017-04-12  60  		ret = pci_iobar_pfn(pdev, bar, vma);
2bea36fd1af440 David Woodhouse 2017-04-12  61  		if (ret)
2bea36fd1af440 David Woodhouse 2017-04-12  62  			return ret;
2bea36fd1af440 David Woodhouse 2017-04-12  63  	} else
f719582435afe9 David Woodhouse 2017-04-12  64  		vma->vm_pgoff += (pci_resource_start(pdev, bar) >> PAGE_SHIFT);
2bea36fd1af440 David Woodhouse 2017-04-12  65  
f719582435afe9 David Woodhouse 2017-04-12  66  	vma->vm_ops = &pci_phys_vm_ops;
f719582435afe9 David Woodhouse 2017-04-12  67  
f719582435afe9 David Woodhouse 2017-04-12  68  	return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
f719582435afe9 David Woodhouse 2017-04-12  69  				  vma->vm_end - vma->vm_start,
f719582435afe9 David Woodhouse 2017-04-12  70  				  vma->vm_page_prot);
f719582435afe9 David Woodhouse 2017-04-12  71  }
f719582435afe9 David Woodhouse 2017-04-12  72  

:::::: The code at line 57 was first introduced by commit
:::::: f719582435afe9c7985206e42d804ea6aa315d33 PCI: Add pci_mmap_resource_range() and use it for ARM64

:::::: TO: David Woodhouse <dwmw@xxxxxxxxxxxx>
:::::: CC: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux