Message ID | 1460112276-5897-1-git-send-email-ulf.hansson@linaro.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Hi Ulf,
[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.6-rc2 next-20160408]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Ulf-Hansson/PM-Runtime-Move-ignore_children-flag-under-CONFIG_PM/20160408-184822
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-i0-201614 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/mmc/host/toshsd.c: In function 'toshsd_probe':
>> drivers/mmc/host/toshsd.c:662:2: error: implicit declaration of function 'pm_suspend_ignore_children' [-Werror=implicit-function-declaration]
pm_suspend_ignore_children(&pdev->dev, 1);
^
cc1: some warnings being treated as errors
vim +/pm_suspend_ignore_children +662 drivers/mmc/host/toshsd.c
a5eb8bbd Ondrej Zary 2014-11-11 656
a5eb8bbd Ondrej Zary 2014-11-11 657 mmc_add_host(mmc);
a5eb8bbd Ondrej Zary 2014-11-11 658
a5eb8bbd Ondrej Zary 2014-11-11 659 base = pci_resource_start(pdev, 0);
a5eb8bbd Ondrej Zary 2014-11-11 660 dev_dbg(&pdev->dev, "MMIO %pa, IRQ %d\n", &base, pdev->irq);
a5eb8bbd Ondrej Zary 2014-11-11 661
a5eb8bbd Ondrej Zary 2014-11-11 @662 pm_suspend_ignore_children(&pdev->dev, 1);
a5eb8bbd Ondrej Zary 2014-11-11 663
a5eb8bbd Ondrej Zary 2014-11-11 664 return 0;
a5eb8bbd Ondrej Zary 2014-11-11 665
:::::: The code at line 662 was first introduced by commit
:::::: a5eb8bbd66ccf9f169419f9652544aec771b7c57 mmc: add Toshiba PCI SD controller driver
:::::: TO: Ondrej Zary <linux@rainbow-software.org>
:::::: CC: Ulf Hansson <ulf.hansson@linaro.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/include/linux/device.h b/include/linux/device.h index 002c597..b130304 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -956,11 +956,6 @@ static inline bool device_async_suspend_enabled(struct device *dev) return !!dev->power.async_suspend; } -static inline void pm_suspend_ignore_children(struct device *dev, bool enable) -{ - dev->power.ignore_children = enable; -} - static inline void dev_pm_syscore_device(struct device *dev, bool val) { #ifdef CONFIG_PM_SLEEP diff --git a/include/linux/pm.h b/include/linux/pm.h index 6a5d654..06eb353 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -563,7 +563,6 @@ struct dev_pm_info { bool is_suspended:1; /* Ditto */ bool is_noirq_suspended:1; bool is_late_suspended:1; - bool ignore_children:1; bool early_init:1; /* Owned by the PM core */ bool direct_complete:1; /* Owned by the PM core */ spinlock_t lock; @@ -591,6 +590,7 @@ struct dev_pm_info { unsigned int deferred_resume:1; unsigned int run_wake:1; unsigned int runtime_auto:1; + bool ignore_children:1; unsigned int no_callbacks:1; unsigned int irq_safe:1; unsigned int use_autosuspend:1; diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 7af093d..2e14d26 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -56,6 +56,11 @@ extern void pm_runtime_update_max_time_suspended(struct device *dev, s64 delta_ns); extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable); +static inline void pm_suspend_ignore_children(struct device *dev, bool enable) +{ + dev->power.ignore_children = enable; +} + static inline bool pm_children_suspended(struct device *dev) { return dev->power.ignore_children @@ -156,6 +161,7 @@ static inline void __pm_runtime_disable(struct device *dev, bool c) {} static inline void pm_runtime_allow(struct device *dev) {} static inline void pm_runtime_forbid(struct device *dev) {} +static inline void pm_suspend_ignore_children(struct device *dev, bool enable) {} static inline bool pm_children_suspended(struct device *dev) { return false; } static inline void pm_runtime_get_noresume(struct device *dev) {} static inline void pm_runtime_put_noidle(struct device *dev) {}
The ignore_children flag is used only when CONFIG_PM is set, so let's move it into that section within the struct dev_pm_info. Move also the corresponding pm_suspend_ignore_children() API out of device.h into pm_runtime.h, to be consistent with similar APIs. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- include/linux/device.h | 5 ----- include/linux/pm.h | 2 +- include/linux/pm_runtime.h | 6 ++++++ 3 files changed, 7 insertions(+), 6 deletions(-)