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: <CAJZ5v0jMXzka7XgG7eXHOFntbSupHrhYvUsLP_YvDz10HpbMcQ@mail.gmail.com>
Date: Thu, 11 Sep 2025 14:50:36 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Pin-yen Lin <treapking@...omium.org>
Cc: "Rafael J . Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>, Pavel Machek <pavel@...nel.org>, 
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Danilo Krummrich <dakr@...nel.org>, 
	Saravana Kannan <saravanak@...gle.com>, Hsin-Te Yuan <yuanhsinte@...omium.org>, linux-pm@...r.kernel.org, 
	Chen-Yu Tsai <wenst@...omium.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] driver core: Export device_link_flag_is_sync_state_only()

On Thu, Sep 11, 2025 at 1:21 PM Pin-yen Lin <treapking@...omium.org> wrote:
>
> Export device_link_flag_is_sync_state_only() for future patches.
>
> Signed-off-by: Pin-yen Lin <treapking@...omium.org>
>
> ---
>
> Changes in v2:
> - New in v2
>
>  drivers/base/core.c    | 3 ++-
>  include/linux/device.h | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index d22d6b23e758..cc6af9b0d59d 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -287,10 +287,11 @@ static bool device_is_ancestor(struct device *dev, struct device *target)
>  #define DL_MARKER_FLAGS                (DL_FLAG_INFERRED | \
>                                  DL_FLAG_CYCLE | \
>                                  DL_FLAG_MANAGED)
> -static inline bool device_link_flag_is_sync_state_only(u32 flags)
> +bool device_link_flag_is_sync_state_only(u32 flags)
>  {
>         return (flags & ~DL_MARKER_FLAGS) == DL_FLAG_SYNC_STATE_ONLY;
>  }
> +EXPORT_SYMBOL_GPL(device_link_flag_is_sync_state_only);

As Greg said, this isn't necessary.

>
>  /**
>   * device_is_dependent - Check if one device depends on another one
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 0470d19da7f2..e27d0bf7c43d 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -1197,6 +1197,7 @@ const char *dev_driver_string(const struct device *dev);
>  struct device_link *device_link_add(struct device *consumer,
>                                     struct device *supplier, u32 flags);
>  void device_link_del(struct device_link *link);
> +bool device_link_flag_is_sync_state_only(u32 flags);

No, you only need it in drivers/base/base.h

>  void device_link_remove(void *consumer, struct device *supplier);
>  void device_links_supplier_sync_state_pause(void);
>  void device_links_supplier_sync_state_resume(void);
> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ