Skip to content

pm: Make SET_*_PM_OPS() macros more smart

David Cohen linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3pm: make PM macros more smartinclude/linux/pm.h+9 -26 replies
2/3usb/xhci: implement proper static inline stubs when !CONFIG_PMdrivers/usb/host/xhci.h+4 -20 replies
3/3usb/xhci-plat: remove unnecessary #ifdef checks for CONFIG_PM_SLEEPdrivers/usb/host/xhci-plat.c+1 -62 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC/PATCH 0/3] pm: Make SET_*_PM_OPS() macros more smart

Hi,

These patches are proposal to extend the lack of #ifdef checks on PM callback to its implementation too.

Currently SET_*_PM_OPS() macros make #ifdefs checks not necessary when setting the callback to PM ops, but the callbacks implementation don't see same benefit.

This RFC Solves a problem reported by Santosh on xhci-plat.c driver due to wrong #ifdef checks:

drivers/usb/host/xhci-plat.c:201:12: warning: ‘xhci_plat_suspend’ defined but not used [-Wunused-function] drivers/usb/host/xhci-plat.c:209:12: warning: ‘xhci_plat_resume’ defined but not used [-Wunused-function]

But instead of fixing the #ifdefs, we remove the need for it :)

Br, David Cohen

---
David Cohen (2):
pm: make PM macros more smart
usb/xhci: implement proper static inline stubs when !CONFIG_PM

Santosh Shilimkar (1):
usb/xhci-plat: remove unnecessary #ifdef checks for CONFIG_PM_SLEEP

 drivers/usb/host/xhci-plat.c |  7 +------
 drivers/usb/host/xhci.h      |  6 ++++--
 include/linux/pm.h           | 11 +++++++++--
 3 files changed, 14 insertions(+), 10 deletions(-)
Signature · 1 line
1.8.4.2