tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/resource head: 2ad70d5e96f3945656cfca8c005384f2a858a8c5 commit: 3dbd970b6d9a96ab471b4b86650a0200a47d375d [4/6] microblaze/PCI: Implement pci_resource_to_user() with pcibios_resource_to_bus() config: microblaze-mmu_defconfig (attached as .config) compiler: microblaze-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 3dbd970b6d9a96ab471b4b86650a0200a47d375d # save the attached .config to linux build tree make.cross ARCH=microblaze All warnings (new ones prefixed by >>): arch/microblaze/pci/pci-common.c: In function 'pci_resource_to_user': >> arch/microblaze/pci/pci-common.c:450:3: warning: passing argument 1 of 'pcibios_resource_to_bus' from incompatible pointer type pcibios_resource_to_bus(dev, ®ion, rsrc); ^ In file included from arch/microblaze/pci/pci-common.c:20:0: include/linux/pci.h:804:6: note: expected 'struct pci_bus *' but argument is of type 'const struct pci_dev *' void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, ^ >> arch/microblaze/pci/pci-common.c:450:3: warning: passing argument 3 of 'pcibios_resource_to_bus' discards 'const' qualifier from pointer target type pcibios_resource_to_bus(dev, ®ion, rsrc); ^ In file included from arch/microblaze/pci/pci-common.c:20:0: include/linux/pci.h:804:6: note: expected 'struct resource *' but argument is of type 'const struct resource *' void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, ^ vim +/pcibios_resource_to_bus +450 arch/microblaze/pci/pci-common.c 434 pr_debug(" -> mapping phys %llx\n", (unsigned long long)offset); 435 436 vma->vm_pgoff = offset >> PAGE_SHIFT; 437 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 438 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, 439 vma->vm_end - vma->vm_start, 440 vma->vm_page_prot); 441 } 442 443 void pci_resource_to_user(const struct pci_dev *dev, int bar, 444 const struct resource *rsrc, 445 resource_size_t *start, resource_size_t *end) 446 { 447 struct pci_bus_region region; 448 449 if (rsrc->flags & IORESOURCE_IO) { > 450 pcibios_resource_to_bus(dev, ®ion, rsrc); 451 *start = region.start; 452 *end = region.end; 453 return; 454 } 455 456 /* We pass a CPU physical address to userland for MMIO instead of a 457 * BAR value because X is lame and expects to be able to use that 458 * to pass to /dev/mem! --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data