Re: [PATCH] PCI: tegra: Use pci_parse_request_of_pci_ranges()

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

 



Hi Rob,

I love your patch! Yet something to improve:

[auto build test ERROR on tegra/for-next]
[also build test ERROR on v5.4-rc5 next-20191030]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Rob-Herring/PCI-tegra-Use-pci_parse_request_of_pci_ranges/20191030-211825
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   drivers/pci/controller/pci-tegra.c: In function 'tegra_pcie_probe':
>> drivers/pci/controller/pci-tegra.c:2689:8: error: too many arguments to function 'pci_parse_request_of_pci_ranges'
     err = pci_parse_request_of_pci_ranges(dev, &host->windows, NULL, &bus);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/of_pci.h:5:0,
                    from drivers/pci/controller/pci-tegra.c:30:
   include/linux/pci.h:2279:5: note: declared here
    int pci_parse_request_of_pci_ranges(struct device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/pci_parse_request_of_pci_ranges +2689 drivers/pci/controller/pci-tegra.c

  2667	
  2668	static int tegra_pcie_probe(struct platform_device *pdev)
  2669	{
  2670		struct device *dev = &pdev->dev;
  2671		struct pci_host_bridge *host;
  2672		struct tegra_pcie *pcie;
  2673		struct pci_bus *child;
  2674		struct resource *bus;
  2675		int err;
  2676	
  2677		host = devm_pci_alloc_host_bridge(dev, sizeof(*pcie));
  2678		if (!host)
  2679			return -ENOMEM;
  2680	
  2681		pcie = pci_host_bridge_priv(host);
  2682		host->sysdata = pcie;
  2683		platform_set_drvdata(pdev, pcie);
  2684	
  2685		pcie->soc = of_device_get_match_data(dev);
  2686		INIT_LIST_HEAD(&pcie->ports);
  2687		pcie->dev = dev;
  2688	
> 2689		err = pci_parse_request_of_pci_ranges(dev, &host->windows, NULL, &bus);
  2690		if (err) {
  2691			dev_err(dev, "Getting bridge resources failed\n");
  2692			return err;
  2693		}
  2694	
  2695		err = tegra_pcie_parse_dt(pcie);
  2696		if (err < 0)
  2697			return err;
  2698	
  2699		err = tegra_pcie_get_resources(pcie);
  2700		if (err < 0) {
  2701			dev_err(dev, "failed to request resources: %d\n", err);
  2702			return err;
  2703		}
  2704	
  2705		err = tegra_pcie_msi_setup(pcie);
  2706		if (err < 0) {
  2707			dev_err(dev, "failed to enable MSI support: %d\n", err);
  2708			goto put_resources;
  2709		}
  2710	
  2711		pm_runtime_enable(pcie->dev);
  2712		err = pm_runtime_get_sync(pcie->dev);
  2713		if (err) {
  2714			dev_err(dev, "fail to enable pcie controller: %d\n", err);
  2715			goto teardown_msi;
  2716		}
  2717	
  2718		host->busnr = bus->start;
  2719		host->dev.parent = &pdev->dev;
  2720		host->ops = &tegra_pcie_ops;
  2721		host->map_irq = tegra_pcie_map_irq;
  2722		host->swizzle_irq = pci_common_swizzle;
  2723	
  2724		err = pci_scan_root_bus_bridge(host);
  2725		if (err < 0) {
  2726			dev_err(dev, "failed to register host: %d\n", err);
  2727			goto pm_runtime_put;
  2728		}
  2729	
  2730		pci_bus_size_bridges(host->bus);
  2731		pci_bus_assign_resources(host->bus);
  2732	
  2733		list_for_each_entry(child, &host->bus->children, node)
  2734			pcie_bus_configure_settings(child);
  2735	
  2736		pci_bus_add_devices(host->bus);
  2737	
  2738		if (IS_ENABLED(CONFIG_DEBUG_FS)) {
  2739			err = tegra_pcie_debugfs_init(pcie);
  2740			if (err < 0)
  2741				dev_err(dev, "failed to setup debugfs: %d\n", err);
  2742		}
  2743	
  2744		return 0;
  2745	
  2746	pm_runtime_put:
  2747		pm_runtime_put_sync(pcie->dev);
  2748		pm_runtime_disable(pcie->dev);
  2749	teardown_msi:
  2750		tegra_pcie_msi_teardown(pcie);
  2751	put_resources:
  2752		tegra_pcie_put_resources(pcie);
  2753		return err;
  2754	}
  2755	

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