public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] misc: rtsx: fix build for CONFIG_PM not set
@ 2022-02-26 22:24 Randy Dunlap
  2022-02-27 12:04 ` Arnd Bergmann
  0 siblings, 1 reply; 11+ messages in thread
From: Randy Dunlap @ 2022-02-26 22:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Wei WANG, Kai-Heng Feng, Greg Kroah-Hartman,
	Arnd Bergmann

When CONFG_WERROR=y and CONFIG_PM is not set, there are fatal build
errors, so surround these functions in an #ifdef CONFIG_PM block.

../drivers/misc/cardreader/rtsx_pcr.c:1057:13: error: ‘rtsx_enable_aspm’ defined but not used [-Werror=unused-function]
 static void rtsx_enable_aspm(struct rtsx_pcr *pcr)
miscread001.out:../drivers/misc/cardreader/rtsx_pcr.c:1065:13: error: ‘rtsx_comm_pm_power_saving’ defined but not used [-Werror=unused-function]
miscread001.out: static void rtsx_comm_pm_power_saving(struct rtsx_pcr *pcr)
../drivers/misc/cardreader/rtsx_pcr.c:1084:13: error: ‘rtsx_pm_power_saving’ defined but not used [-Werror=unused-function]
 static void rtsx_pm_power_saving(struct rtsx_pcr *pcr)

Fixes: 597568e8df04 ("misc: rtsx: Rework runtime power management flow")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Wei WANG <wei_wang@realsil.com.cn>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 drivers/misc/cardreader/rtsx_pcr.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20220225.orig/drivers/misc/cardreader/rtsx_pcr.c
+++ linux-next-20220225/drivers/misc/cardreader/rtsx_pcr.c
@@ -1054,6 +1054,7 @@ static int rtsx_pci_acquire_irq(struct r
 	return 0;
 }
 
+#ifdef CONFIG_PM
 static void rtsx_enable_aspm(struct rtsx_pcr *pcr)
 {
 	if (pcr->ops->set_aspm)
@@ -1085,6 +1086,7 @@ static void rtsx_pm_power_saving(struct
 {
 	rtsx_comm_pm_power_saving(pcr);
 }
+#endif
 
 static void rtsx_base_force_power_down(struct rtsx_pcr *pcr)
 {

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

end of thread, other threads:[~2022-03-06 17:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-26 22:24 [PATCH -next] misc: rtsx: fix build for CONFIG_PM not set Randy Dunlap
2022-02-27 12:04 ` Arnd Bergmann
2022-02-27 16:57   ` Randy Dunlap
2022-02-27 17:30     ` Arnd Bergmann
2022-02-27 17:46       ` Paul Cercueil
2022-02-27 17:51         ` Arnd Bergmann
2022-02-27 17:56           ` Paul Cercueil
2022-03-06 15:12             ` Jonathan Cameron
2022-03-06 15:29               ` Paul Cercueil
2022-03-06 17:57                 ` Jonathan Cameron
2022-03-06 16:24               ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox