linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pci:pci/pm 4/7] drivers/pci/pci-driver.c:1348:2: error: implicit declaration of function 'pci_pm_default_resume'; did you mean 'pci_pm_runtime_resume'?
@ 2019-10-17  0:59 kbuild test robot
  2019-10-17 19:26 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2019-10-17  0:59 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: kbuild-all, linux-pci, Rafael J. Wysocki

[-- Attachment #1: Type: text/plain, Size: 2219 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/pm
head:   d17ff4ab7daac4bf26d59a4de3ca22f42492425b
commit: 6d133f6f1934493a0dc0504fa115e5140d010522 [4/7] PCI/PM: Run resume fixups before disabling wakeup events
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.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 6d133f6f1934493a0dc0504fa115e5140d010522
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=ia64 

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

All errors (new ones prefixed by >>):

   drivers/pci/pci-driver.c: In function 'pci_pm_runtime_resume':
>> drivers/pci/pci-driver.c:1348:2: error: implicit declaration of function 'pci_pm_default_resume'; did you mean 'pci_pm_runtime_resume'? [-Werror=implicit-function-declaration]
     pci_pm_default_resume(pci_dev);
     ^~~~~~~~~~~~~~~~~~~~~
     pci_pm_runtime_resume
   cc1: some warnings being treated as errors

vim +1348 drivers/pci/pci-driver.c

  1330	
  1331	static int pci_pm_runtime_resume(struct device *dev)
  1332	{
  1333		int rc = 0;
  1334		struct pci_dev *pci_dev = to_pci_dev(dev);
  1335		const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
  1336	
  1337		/*
  1338		 * Restoring config space is necessary even if the device is not bound
  1339		 * to a driver because although we left it in D0, it may have gone to
  1340		 * D3cold when the bridge above it runtime suspended.
  1341		 */
  1342		pci_restore_standard_config(pci_dev);
  1343	
  1344		if (!pci_dev->driver)
  1345			return 0;
  1346	
  1347		pci_fixup_device(pci_fixup_resume_early, pci_dev);
> 1348		pci_pm_default_resume(pci_dev);
  1349	
  1350		if (pm && pm->runtime_resume)
  1351			rc = pm->runtime_resume(dev);
  1352	
  1353		pci_dev->runtime_d3cold = false;
  1354	
  1355		return rc;
  1356	}
  1357	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 54928 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pci:pci/pm 4/7] drivers/pci/pci-driver.c:1348:2: error: implicit declaration of function 'pci_pm_default_resume'; did you mean 'pci_pm_runtime_resume'?
  2019-10-17  0:59 [pci:pci/pm 4/7] drivers/pci/pci-driver.c:1348:2: error: implicit declaration of function 'pci_pm_default_resume'; did you mean 'pci_pm_runtime_resume'? kbuild test robot
@ 2019-10-17 19:26 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2019-10-17 19:26 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, linux-pci, Rafael J. Wysocki

On Thu, Oct 17, 2019 at 08:59:56AM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/pm
> head:   d17ff4ab7daac4bf26d59a4de3ca22f42492425b
> commit: 6d133f6f1934493a0dc0504fa115e5140d010522 [4/7] PCI/PM: Run resume fixups before disabling wakeup events
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 7.4.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 6d133f6f1934493a0dc0504fa115e5140d010522
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.4.0 make.cross ARCH=ia64 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/pci/pci-driver.c: In function 'pci_pm_runtime_resume':
> >> drivers/pci/pci-driver.c:1348:2: error: implicit declaration of function 'pci_pm_default_resume'; did you mean 'pci_pm_runtime_resume'? [-Werror=implicit-function-declaration]
>      pci_pm_default_resume(pci_dev);
>      ^~~~~~~~~~~~~~~~~~~~~
>      pci_pm_runtime_resume
>    cc1: some warnings being treated as errors

I think I fixed this by moving the pci_pm_default_resume() definition
as follows:

    pci_pm_default_resume() is called from pci_pm_runtime_resume(), which is
    under #ifdef CONFIG_PM.  If SUSPEND and HIBERNATION are disabled, PM_SLEEP
    is disabled also, so move pci_pm_default_resume() from #ifdef
    CONFIG_PM_SLEEP to #ifdef CONFIG_PM.

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 55acb658273f..abee2a790a10 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -517,6 +517,12 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev)
 	return 0;
 }
 
+static void pci_pm_default_resume(struct pci_dev *pci_dev)
+{
+	pci_fixup_device(pci_fixup_resume, pci_dev);
+	pci_enable_wake(pci_dev, PCI_D0, false);
+}
+
 #endif
 
 #ifdef CONFIG_PM_SLEEP
@@ -645,12 +651,6 @@ static int pci_legacy_resume(struct device *dev)
 
 /* Auxiliary functions used by the new power management framework */
 
-static void pci_pm_default_resume(struct pci_dev *pci_dev)
-{
-	pci_fixup_device(pci_fixup_resume, pci_dev);
-	pci_enable_wake(pci_dev, PCI_D0, false);
-}
-
 static void pci_pm_default_suspend(struct pci_dev *pci_dev)
 {
 	/* Disable non-bridge devices without PM support */
@@ -992,7 +992,6 @@ static int pci_pm_resume(struct device *dev)
 
 #ifdef CONFIG_HIBERNATE_CALLBACKS
 
-
 /*
  * pcibios_pm_ops - provide arch-specific hooks when a PCI device is doing
  * a hibernate transition

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-17 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-17  0:59 [pci:pci/pm 4/7] drivers/pci/pci-driver.c:1348:2: error: implicit declaration of function 'pci_pm_default_resume'; did you mean 'pci_pm_runtime_resume'? kbuild test robot
2019-10-17 19:26 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).