[pci:pci/sparc 4/8] arch/sparc/kernel/pci.c:754:53: error: 'old_cmd' undeclared; did you mean 'oldcmd'?

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

 



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: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 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=sparc64 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/pci.h:31:0,
                    from arch/sparc/kernel/pci.c:18:
   arch/sparc/kernel/pci.c: In function 'pcibios_enable_device':
>> arch/sparc/kernel/pci.c:754: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/pci.c:754:3: note: in expansion of macro 'pci_info'
      pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd);
      ^~~~~~~~
   arch/sparc/kernel/pci.c:754: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/pci.c:754:3: note: in expansion of macro 'pci_info'
      pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd);
      ^~~~~~~~
--
   In file included from include/linux/pci.h:31:0,
                    from arch/sparc/kernel/pci_common.c:9:
   arch/sparc/kernel/pci_common.c: In function 'pci_scan_for_parity_error':
>> arch/sparc/kernel/pci_common.c:539:13: error: 'dev' undeclared (first use in this function); did you mean 'pdev'?
       pci_info(dev, "%s: Device saw Parity Error [%016x]\n",
                ^
   include/linux/device.h:1382:46: note: in definition of macro 'dev_info'
    #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
                                                 ^~~
>> arch/sparc/kernel/pci_common.c:539:4: note: in expansion of macro 'pci_info'
       pci_info(dev, "%s: Device saw Parity Error [%016x]\n",
       ^~~~~~~~
   arch/sparc/kernel/pci_common.c:539:13: note: each undeclared identifier is reported only once for each function it appears in
       pci_info(dev, "%s: Device saw Parity Error [%016x]\n",
                ^
   include/linux/device.h:1382:46: note: in definition of macro 'dev_info'
    #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
                                                 ^~~
>> arch/sparc/kernel/pci_common.c:539:4: note: in expansion of macro 'pci_info'
       pci_info(dev, "%s: Device saw Parity Error [%016x]\n",
       ^~~~~~~~
--
   In file included from arch/sparc/kernel/pci_impl.h:12:0,
                    from arch/sparc/kernel/pci_msi.c:11:
   arch/sparc/kernel/pci_msi.c: In function 'sparc64_teardown_msi_irq':
>> arch/sparc/kernel/pci_msi.c:204:16: error: expected ')' before string constant
      pci_err(pdev "%s: teardown: ops->teardown() on MSI %u, "
                   ^
   include/linux/pci.h:2300:46: note: in definition of macro 'pci_err'
    #define pci_err(pdev, fmt, arg...) dev_err(&(pdev)->dev, fmt, ##arg)
                                                 ^~~~

vim +754 arch/sparc/kernel/pci.c

   731	
   732	int pcibios_enable_device(struct pci_dev *dev, int mask)
   733	{
   734		u16 cmd, oldcmd;
   735		int i;
   736	
   737		pci_read_config_word(dev, PCI_COMMAND, &cmd);
   738		oldcmd = cmd;
   739	
   740		for (i = 0; i < PCI_NUM_RESOURCES; i++) {
   741			struct resource *res = &dev->resource[i];
   742	
   743			/* Only set up the requested stuff */
   744			if (!(mask & (1<<i)))
   745				continue;
   746	
   747			if (res->flags & IORESOURCE_IO)
   748				cmd |= PCI_COMMAND_IO;
   749			if (res->flags & IORESOURCE_MEM)
   750				cmd |= PCI_COMMAND_MEMORY;
   751		}
   752	
   753		if (cmd != oldcmd) {
 > 754			pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd);
   755			pci_write_config_word(dev, PCI_COMMAND, cmd);
   756		}
   757		return 0;
   758	}
   759	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux