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-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0g1S8U6+UxzfN5xxzYFB7PZK5V5zdsb3RdJj0sHkYPkTA@mail.gmail.com>
Date:   Mon, 13 Feb 2023 19:18:39 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Richard Fitzgerald <rf@...nsource.cirrus.com>
Cc:     rafael@...nel.org, pavel@....cz, len.brown@...el.com,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        patches@...nsource.cirrus.com
Subject: Re: [PATCH v2] PM: Add EXPORT macros for exporting PM functions

On Mon, Feb 13, 2023 at 5:50 PM Richard Fitzgerald
<rf@...nsource.cirrus.com> wrote:
>
> Add a pair of macros for exporting functions only if CONFIG_PM
> is enabled.
>
> The naming follows the style of the standard EXPORT_SYMBOL_*()
> macros that they replace.
>
> Sometimes a module wants to export PM functions directly to other
> drivers, not a complete struct dev_pm_ops. A typical example is
> where a core library exports the generic (shared) implementation
> and calling code wraps one or more of these in custom code.
>
> Signed-off-by: Richard Fitzgerald <rf@...nsource.cirrus.com>
> ---
>  include/linux/pm.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/pm.h b/include/linux/pm.h
> index 93cd34f00822..035d9649eba4 100644
> --- a/include/linux/pm.h
> +++ b/include/linux/pm.h
> @@ -379,9 +379,13 @@ const struct dev_pm_ops name = { \
>         const struct dev_pm_ops name;                                   \
>         __EXPORT_SYMBOL(name, sec, ns);                                 \
>         const struct dev_pm_ops name
> +#define EXPORT_PM_FN_GPL(name)         EXPORT_SYMBOL_GPL(name)
> +#define EXPORT_PM_FN_NS_GPL(name, ns)  EXPORT_SYMBOL_NS_GPL(name, ns)
>  #else
>  #define _EXPORT_DEV_PM_OPS(name, sec, ns)                              \
>         static __maybe_unused const struct dev_pm_ops __static_##name
> +#define EXPORT_PM_FN_GPL(name)
> +#define EXPORT_PM_FN_NS_GPL(name, ns)
>  #endif
>
>  #define EXPORT_DEV_PM_OPS(name) _EXPORT_DEV_PM_OPS(name, "", "")
> --

Applied as 6.3 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ