From: Bjorn Helgaas <helgaas@kernel.org>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, linux-pci@vger.kernel.org,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: 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'?
Date: Thu, 17 Oct 2019 14:26:15 -0500 [thread overview]
Message-ID: <20191017192615.GA240632@google.com> (raw)
In-Reply-To: <201910170851.fNrXjGg1%lkp@intel.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: kbuild-all@lists.01.org
Subject: 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'?
Date: Thu, 17 Oct 2019 14:26:15 -0500 [thread overview]
Message-ID: <20191017192615.GA240632@google.com> (raw)
In-Reply-To: <201910170851.fNrXjGg1%lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2783 bytes --]
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
next prev parent reply other threads:[~2019-10-17 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 0:59 ` kbuild test robot
2019-10-17 19:26 ` Bjorn Helgaas [this message]
2019-10-17 19:26 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191017192615.GA240632@google.com \
--to=helgaas@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-pci@vger.kernel.org \
--cc=lkp@intel.com \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.