tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/sparc head: bcc2b2c282ef2234b183d979f0cac647231b5ce2 commit: 2b625e33479aa77d59fb39fc90bd024f0069583a [4/8] sparc/PCI: Use dev_printk() when possible config: sparc-defconfig (attached as .config) compiler: sparc-linux-gcc (GCC) 7.2.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 2b625e33479aa77d59fb39fc90bd024f0069583a # save the attached .config to linux build tree make.cross ARCH=sparc All error/warnings (new ones prefixed by >>): arch/sparc/kernel/pcic.c: In function 'pcibios_fixup_bus': arch/sparc/kernel/pcic.c:606:15: error: unused variable 'cmd' [-Werror=unused-variable] unsigned int cmd = 0; ^~~ arch/sparc/kernel/pcic.c:605:17: error: unused variable 'has_mem' [-Werror=unused-variable] int i, has_io, has_mem; ^~~~~~~ arch/sparc/kernel/pcic.c:605:9: error: unused variable 'has_io' [-Werror=unused-variable] int i, has_io, has_mem; ^~~~~~ arch/sparc/kernel/pcic.c:605:6: error: unused variable 'i' [-Werror=unused-variable] int i, has_io, has_mem; ^ In file included from include/linux/pci.h:31:0, from arch/sparc/kernel/pcic.c:25: arch/sparc/kernel/pcic.c: In function 'pcibios_enable_device': >> arch/sparc/kernel/pcic.c:668:53: error: 'old_cmd' undeclared (first use in this function); did you mean 'oldcmd'? pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd); ^ include/linux/device.h:1382:58: note: in definition of macro 'dev_info' #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg) ^~~ >> arch/sparc/kernel/pcic.c:668:3: note: in expansion of macro 'pci_info' pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd); ^~~~~~~~ arch/sparc/kernel/pcic.c:668:53: note: each undeclared identifier is reported only once for each function it appears in pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd); ^ include/linux/device.h:1382:58: note: in definition of macro 'dev_info' #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg) ^~~ >> arch/sparc/kernel/pcic.c:668:3: note: in expansion of macro 'pci_info' pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd); ^~~~~~~~ arch/sparc/kernel/pcic.c: At top level: arch/sparc/kernel/pcic.c:746:5: error: redefinition of 'pcibios_enable_device' int pcibios_enable_device(struct pci_dev *pdev, int mask) ^~~~~~~~~~~~~~~~~~~~~ arch/sparc/kernel/pcic.c:646:5: note: previous definition of 'pcibios_enable_device' was here int pcibios_enable_device(struct pci_dev *dev, int mask) ^~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors vim +668 arch/sparc/kernel/pcic.c 598 599 /* 600 * Normally called from {do_}pci_scan_bus... 601 */ 602 void pcibios_fixup_bus(struct pci_bus *bus) 603 { 604 struct pci_dev *dev; > 605 int i, has_io, has_mem; 606 unsigned int cmd = 0; 607 struct linux_pcic *pcic; 608 /* struct linux_pbm_info* pbm = &pcic->pbm; */ 609 int node; 610 struct pcidev_cookie *pcp; 611 612 if (!pcic0_up) { 613 pci_info(bus, "pcibios_fixup_bus: no PCIC\n"); 614 return; 615 } 616 pcic = &pcic0; 617 618 /* 619 * Next crud is an equivalent of pbm = pcic_bus_to_pbm(bus); 620 */ 621 if (bus->number != 0) { 622 pci_info(bus, "pcibios_fixup_bus: nonzero bus 0x%x\n", 623 bus->number); 624 return; 625 } 626 627 list_for_each_entry(dev, &bus->devices, bus_list) { 628 node = pdev_to_pnode(&pcic->pbm, dev); 629 if(node == 0) 630 node = -1; 631 632 /* cookies */ 633 pcp = pci_devcookie_alloc(); 634 pcp->pbm = &pcic->pbm; 635 pcp->prom_node = of_find_node_by_phandle(node); 636 dev->sysdata = pcp; 637 638 /* fixing I/O to look like memory */ 639 if ((dev->class>>16) != PCI_BASE_CLASS_BRIDGE) 640 pcic_map_pci_device(pcic, dev, node); 641 642 pcic_fill_irq(pcic, dev, node); 643 } 644 } 645 646 int pcibios_enable_device(struct pci_dev *dev, int mask) 647 { 648 u16 cmd, oldcmd; 649 int i; 650 651 pci_read_config_word(dev, PCI_COMMAND, &cmd); 652 oldcmd = cmd; 653 654 for (i = 0; i < PCI_NUM_RESOURCES; i++) { 655 struct resource *res = &dev->resource[i]; 656 657 /* Only set up the requested stuff */ 658 if (!(mask & (1<<i))) 659 continue; 660 661 if (res->flags & IORESOURCE_IO) 662 cmd |= PCI_COMMAND_IO; 663 if (res->flags & IORESOURCE_MEM) 664 cmd |= PCI_COMMAND_MEMORY; 665 } 666 667 if (cmd != oldcmd) { > 668 pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd); 669 pci_write_config_word(dev, PCI_COMMAND, cmd); 670 } 671 return 0; 672 } 673 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip