Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1352838
| From | Kalle Valo <kvalo@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [10/14] wireless: cw1200: use __maybe_unused to hide pm functions_ |
| Date | 2016-03-08 11:40 +0100 |
| Message-ID | <randw-84x-17@gated-at.bofh.it> (permalink) |
| References | <r8hvA-1yT-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> 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 <arnd@arndb.de> Thanks, applied to wireless-drivers-next.git. Kalle Valo
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [10/14] wireless: cw1200: use __maybe_unused to hide pm functions_ Kalle Valo <kvalo@codeaurora.org> - 2016-03-08 11:40 +0100
csiph-web