]> git.baikalelectronics.ru Git - kernel.git/commit
rtw88: avoid unused function warnings
authorArnd Bergmann <arnd@arndb.de>
Wed, 8 Apr 2020 18:53:51 +0000 (20:53 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 14 Apr 2020 12:45:36 +0000 (15:45 +0300)
commitfe7a0d2d68c3d956d5f8b3115e849cb59e78f0d8
tree2add58ca447565e8b3abbbf4af5c23d44641867a
parent4e3a700989905041de26129307995c218b2e69a4
rtw88: avoid unused function warnings

The rtw88 driver defines emtpy functions with multiple indirections
but gets one of these wrong:

drivers/net/wireless/realtek/rtw88/pci.c:1347:12: error: 'rtw_pci_resume' defined but not used [-Werror=unused-function]
 1347 | static int rtw_pci_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~
drivers/net/wireless/realtek/rtw88/pci.c:1342:12: error: 'rtw_pci_suspend' defined but not used [-Werror=unused-function]
 1342 | static int rtw_pci_suspend(struct device *dev)

Better simplify it to rely on the conditional reference in
SIMPLE_DEV_PM_OPS(), and mark the functions as __maybe_unused to avoid
warning about it.

I'm not sure if these are needed at all given that the functions
don't do anything, but they were only recently added.

Fixes: 950f7af1fe85 ("rtw88: support wowlan feature for 8822c")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200408185413.218643-1-arnd@arndb.de
drivers/net/wireless/realtek/rtw88/pci.c