Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1355052
| From | Mathias Nyman <mathias.nyman@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/6] usb: xhci-mtk: use __maybe_unused to hide pm functions |
| Date | 2016-03-10 12:40 +0100 |
| Message-ID | <rb76G-6oK-15@gated-at.bofh.it> (permalink) |
| References | <r8gSS-14i-7@gated-at.bofh.it> <r8gST-14i-23@gated-at.bofh.it> <r90VH-14h-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04.03.2016 18:33, Matthias Brugger wrote: > > > On 02/03/16 16:24, Arnd Bergmann wrote: >> The mediatek XHCI glue driver uses SET_SYSTEM_SLEEP_PM_OPS() to >> conditionally set the correct suspend/resume options, and >> also puts both the dev_pm_ops and the functions inside of >> an #ifdef testing for CONFIG_PM_SLEEP, but those functions >> then call other code that becomes unused: >> >> drivers/usb/host/xhci-mtk.c:135:12: error: 'xhci_mtk_host_disable' defined but not used [-Werror=unused-function] >> drivers/usb/host/xhci-mtk.c:313:13: error: 'usb_wakeup_enable' defined but not used [-Werror=unused-function] >> drivers/usb/host/xhci-mtk.c:321:13: error: 'usb_wakeup_disable' defined but not used [-Werror=unused-function] >> >> This replaces the #ifdef with __maybe_unused annotations so the >> compiler knows it can silently drop them instead of warning. >> >> 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> >> --- > > Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> > Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 2/6] usb: xhci-mtk: use __maybe_unused to hide pm functions Matthias Brugger <matthias.bgg@gmail.com> - 2016-03-04 17:40 +0100 Re: [PATCH 2/6] usb: xhci-mtk: use __maybe_unused to hide pm functions Mathias Nyman <mathias.nyman@linux.intel.com> - 2016-03-10 12:40 +0100
csiph-web