From mboxrd@z Thu Jan 1 00:00:00 1970 From: kvalo@codeaurora.org (Kalle Valo) Date: Tue, 8 Mar 2016 10:33:29 +0000 (UTC) Subject: [10/14] wireless: cw1200: use __maybe_unused to hide pm functions_ In-Reply-To: <1456934350-1389172-11-git-send-email-arnd@arndb.de> Message-ID: <20160308103329.3188E6074A@smtp.codeaurora.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org > The cw1200 uses #ifdef to check for CONFIG_PM, but then > uses SIMPLE_DEV_PM_OPS, which leaves the references out when > CONFIG_PM_SLEEP is not defined, so we get a warning with > PM=y && PM_SLEEP=n: > > drivers/net/wireless/st/cw1200/cw1200_spi.c:450:12: error: 'cw1200_spi_suspend' defined but not used [-Werror=unused-function] > > This removes the incorrect #ifdef and instead uses a __maybe_unused > annotation to let the compiler know it can silently drop > the function definition. > > For the DEV_PM_OPS definition, we can use an IS_ENABLED() check > to avoid defining the structure when CONFIG_PM is not set without > the #ifdef. > > Signed-off-by: Arnd Bergmann Thanks, applied to wireless-drivers-next.git. Kalle Valo