lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  7 Dec 2021 00:20:57 +0000
From:   Paul Cercueil <paul@...pouillou.net>
To:     "Rafael J . Wysocki" <rafael@...nel.org>,
        Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Arnd Bergmann <arnd@...db.de>,
        Jonathan Cameron <jic23@...nel.org>
Cc:     list@...ndingux.net, linux-mips@...r.kernel.org,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, linux-pm@...r.kernel.org,
        Paul Cercueil <paul@...pouillou.net>
Subject: [PATCH 0/5] Rework pm_ptr() and *_PM_OPS macros

Hi,

This patchset reworks the pm_ptr() macro I introduced a few versions
ago, so that it is not conditionally defined.

It applies the same treatment to the *_PM_OPS macros. Instead of
modifying the existing ones, which would mean a 2000+ patch bomb, this
patchset introduce two new macros to replace the now deprecated
UNIVERSAL_DEV_PM_OPS() and SIMPLE_DEV_PM_OPS().

The point of all of this, is to progressively switch from a code model
where PM callbacks are all protected behind CONFIG_PM guards, to a code
model where PM callbacks are always seen by the compiler, but discarded
if not used.

Patch [4/5] and [5/5] are just examples to illustrate the use of the new
macros. As such they don't really have to be merged at the same time as
the rest and can be delayed until a subsystem-wide patchset is proposed.

- Patch [4/5] modifies a driver that already used the pm_ptr() macro,
  but had to use the __maybe_unused flag to avoid compiler warnings;
- Patch [5/5] modifies a driver that used a #ifdef CONFIG_PM guard
  around its suspend/resume functions.

Paul Cercueil (5):
  r8169: Avoid misuse of pm_ptr() macro
  PM: core: Redefine pm_ptr() macro
  PM: core: Add new *_PM_OPS macros, deprecate old ones
  mmc: jz4740: Use the new PM macros
  mmc: mxc: Use the new PM macros

 drivers/mmc/host/jz4740_mmc.c             |  8 +--
 drivers/mmc/host/mxcmmc.c                 |  6 +-
 drivers/net/ethernet/realtek/r8169_main.c |  4 +-
 include/linux/pm.h                        | 80 +++++++++++++++--------
 4 files changed, 60 insertions(+), 38 deletions(-)

-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ