[pci:pci/host-xilinx 22/25] drivers/pci/host/pcie-xilinx-nwl.c:281:23: error: 'pcie' undeclared

[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/host-xilinx
head:   745677c5797041c6a7f15a464f1ec67f8ef65898
commit: 0f039243ba4523fd1c3e93e603afe3b66ac81ff1 [22/25] PCI: xilinx-nwl: Name private struct pointer "nwl" consistently
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
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 0f039243ba4523fd1c3e93e603afe3b66ac81ff1
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

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

   drivers/pci/host/pcie-xilinx-nwl.c: In function 'nwl_wait_for_link':
>> drivers/pci/host/pcie-xilinx-nwl.c:215:17: warning: unused variable 'dev' [-Wunused-variable]
     struct device *dev = nwl_pcie->dev;
                    ^~~
   drivers/pci/host/pcie-xilinx-nwl.c: In function 'nwl_pcie_misc_handler':
>> drivers/pci/host/pcie-xilinx-nwl.c:281:23: error: 'pcie' undeclared (first use in this function)
     struct device *dev = pcie->dev;
                          ^~~~
   drivers/pci/host/pcie-xilinx-nwl.c:281:23: note: each undeclared identifier is reported only once for each function it appears in

vim +/pcie +281 drivers/pci/host/pcie-xilinx-nwl.c

ab597d35 Bharat Kumar Gogada 2016-03-06  209  		return true;
ab597d35 Bharat Kumar Gogada 2016-03-06  210  	return false;
ab597d35 Bharat Kumar Gogada 2016-03-06  211  }
ab597d35 Bharat Kumar Gogada 2016-03-06  212  
0f039243 Bjorn Helgaas       2016-10-06  213  static int nwl_wait_for_link(struct nwl_pcie *nwl_pcie)
ab597d35 Bharat Kumar Gogada 2016-03-06  214  {
0f039243 Bjorn Helgaas       2016-10-06 @215  	struct device *dev = nwl_pcie->dev;
ab597d35 Bharat Kumar Gogada 2016-03-06  216  	int retries;
ab597d35 Bharat Kumar Gogada 2016-03-06  217  
ab597d35 Bharat Kumar Gogada 2016-03-06  218  	/* check if the link is up or not */
ab597d35 Bharat Kumar Gogada 2016-03-06  219  	for (retries = 0; retries < LINK_WAIT_MAX_RETRIES; retries++) {
0f039243 Bjorn Helgaas       2016-10-06  220  		if (nwl_phy_link_up(nwl_pcie))
ab597d35 Bharat Kumar Gogada 2016-03-06  221  			return 0;
ab597d35 Bharat Kumar Gogada 2016-03-06  222  		usleep_range(LINK_WAIT_USLEEP_MIN, LINK_WAIT_USLEEP_MAX);
ab597d35 Bharat Kumar Gogada 2016-03-06  223  	}
ab597d35 Bharat Kumar Gogada 2016-03-06  224  
0f039243 Bjorn Helgaas       2016-10-06  225  	dev_err(nwl_pcie->dev, "PHY link never came up\n");
ab597d35 Bharat Kumar Gogada 2016-03-06  226  	return -ETIMEDOUT;
ab597d35 Bharat Kumar Gogada 2016-03-06  227  }
ab597d35 Bharat Kumar Gogada 2016-03-06  228  
ab597d35 Bharat Kumar Gogada 2016-03-06  229  static bool nwl_pcie_valid_device(struct pci_bus *bus, unsigned int devfn)
ab597d35 Bharat Kumar Gogada 2016-03-06  230  {
0f039243 Bjorn Helgaas       2016-10-06  231  	struct nwl_pcie *nwl_pcie = bus->sysdata;
ab597d35 Bharat Kumar Gogada 2016-03-06  232  
ab597d35 Bharat Kumar Gogada 2016-03-06  233  	/* Check link before accessing downstream ports */
0f039243 Bjorn Helgaas       2016-10-06  234  	if (bus->number != nwl_pcie->root_busno) {
0f039243 Bjorn Helgaas       2016-10-06  235  		if (!nwl_pcie_link_up(nwl_pcie))
ab597d35 Bharat Kumar Gogada 2016-03-06  236  			return false;
ab597d35 Bharat Kumar Gogada 2016-03-06  237  	}
ab597d35 Bharat Kumar Gogada 2016-03-06  238  
ab597d35 Bharat Kumar Gogada 2016-03-06  239  	/* Only one device down on each root port */
0f039243 Bjorn Helgaas       2016-10-06  240  	if (bus->number == nwl_pcie->root_busno && devfn > 0)
ab597d35 Bharat Kumar Gogada 2016-03-06  241  		return false;
ab597d35 Bharat Kumar Gogada 2016-03-06  242  
ab597d35 Bharat Kumar Gogada 2016-03-06  243  	return true;
ab597d35 Bharat Kumar Gogada 2016-03-06  244  }
ab597d35 Bharat Kumar Gogada 2016-03-06  245  
ab597d35 Bharat Kumar Gogada 2016-03-06  246  /**
ab597d35 Bharat Kumar Gogada 2016-03-06  247   * nwl_pcie_map_bus - Get configuration base
ab597d35 Bharat Kumar Gogada 2016-03-06  248   *
ab597d35 Bharat Kumar Gogada 2016-03-06  249   * @bus: Bus structure of current bus
ab597d35 Bharat Kumar Gogada 2016-03-06  250   * @devfn: Device/function
ab597d35 Bharat Kumar Gogada 2016-03-06  251   * @where: Offset from base
ab597d35 Bharat Kumar Gogada 2016-03-06  252   *
ab597d35 Bharat Kumar Gogada 2016-03-06  253   * Return: Base address of the configuration space needed to be
ab597d35 Bharat Kumar Gogada 2016-03-06  254   *	   accessed.
ab597d35 Bharat Kumar Gogada 2016-03-06  255   */
ab597d35 Bharat Kumar Gogada 2016-03-06  256  static void __iomem *nwl_pcie_map_bus(struct pci_bus *bus, unsigned int devfn,
ab597d35 Bharat Kumar Gogada 2016-03-06  257  				      int where)
ab597d35 Bharat Kumar Gogada 2016-03-06  258  {
0f039243 Bjorn Helgaas       2016-10-06  259  	struct nwl_pcie *nwl_pcie = bus->sysdata;
ab597d35 Bharat Kumar Gogada 2016-03-06  260  	int relbus;
ab597d35 Bharat Kumar Gogada 2016-03-06  261  
ab597d35 Bharat Kumar Gogada 2016-03-06  262  	if (!nwl_pcie_valid_device(bus, devfn))
ab597d35 Bharat Kumar Gogada 2016-03-06  263  		return NULL;
ab597d35 Bharat Kumar Gogada 2016-03-06  264  
ab597d35 Bharat Kumar Gogada 2016-03-06  265  	relbus = (bus->number << ECAM_BUS_LOC_SHIFT) |
ab597d35 Bharat Kumar Gogada 2016-03-06  266  			(devfn << ECAM_DEV_LOC_SHIFT);
ab597d35 Bharat Kumar Gogada 2016-03-06  267  
0f039243 Bjorn Helgaas       2016-10-06  268  	return nwl_pcie->ecam_base + relbus + where;
ab597d35 Bharat Kumar Gogada 2016-03-06  269  }
ab597d35 Bharat Kumar Gogada 2016-03-06  270  
ab597d35 Bharat Kumar Gogada 2016-03-06  271  /* PCIe operations */
ab597d35 Bharat Kumar Gogada 2016-03-06  272  static struct pci_ops nwl_pcie_ops = {
ab597d35 Bharat Kumar Gogada 2016-03-06  273  	.map_bus = nwl_pcie_map_bus,
ab597d35 Bharat Kumar Gogada 2016-03-06  274  	.read  = pci_generic_config_read,
ab597d35 Bharat Kumar Gogada 2016-03-06  275  	.write = pci_generic_config_write,
ab597d35 Bharat Kumar Gogada 2016-03-06  276  };
ab597d35 Bharat Kumar Gogada 2016-03-06  277  
ab597d35 Bharat Kumar Gogada 2016-03-06  278  static irqreturn_t nwl_pcie_misc_handler(int irq, void *data)
ab597d35 Bharat Kumar Gogada 2016-03-06  279  {
0f039243 Bjorn Helgaas       2016-10-06  280  	struct nwl_pcie *nwl_pcie = data;
6b1ccfe1 Bjorn Helgaas       2016-10-06 @281  	struct device *dev = pcie->dev;
ab597d35 Bharat Kumar Gogada 2016-03-06  282  	u32 misc_stat;
ab597d35 Bharat Kumar Gogada 2016-03-06  283  
ab597d35 Bharat Kumar Gogada 2016-03-06  284  	/* Checking for misc interrupts */

:::::: The code at line 281 was first introduced by commit
:::::: 6b1ccfe119c2f1572f4a7affdda200029d881d34 PCI: xilinx-nwl: Add local struct device pointers

:::::: TO: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
:::::: CC: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

---
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