]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Wed, 6 Sep 2017 12:58:53 +0000 (14:58 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 21 Sep 2017 15:01:30 +0000 (18:01 +0300)
commitaff8d776d3a1f9b561d3a3280d6c6714de415580
tree08dcb2b02d6c106398fb71c25a9e0156ce68771a
parente241b986d8a039d81a61ef0806ba7f329f07b5d2
ath10k: mark PM functions as __maybe_unused

When CONFIG_PM_SLEEP is disabled, we get a compile-time
warning:

drivers/net/wireless/ath/ath10k/pci.c:3417:12: error: 'ath10k_pci_pm_resume' defined but not used [-Werror=unused-function]
 static int ath10k_pci_pm_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath10k/pci.c:3401:12: error: 'ath10k_pci_pm_suspend' defined but not used [-Werror=unused-function]
 static int ath10k_pci_pm_suspend(struct device *dev)

Rather than fixing the #ifdef, this just marks both functions
as __maybe_unused, which is a more robust way to do this.

Fixes: 9972e31487cf ("ath10k: add the PCI PM core suspend/resume ops")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/pci.c