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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250924100429.GM28073@pendragon.ideasonboard.com>
Date: Wed, 24 Sep 2025 13:04:29 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-input@...r.kernel.org, linux-leds@...r.kernel.org,
	linux-media@...r.kernel.org, netdev@...r.kernel.org,
	linux-spi@...r.kernel.org, "Rafael J. Wysocki" <rafael@...nel.org>,
	Len Brown <lenb@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Danilo Krummrich <dakr@...nel.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Daniel Scally <djrscally@...il.com>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Javier Carrasco <javier.carrasco@...fvision.net>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Lee Jones <lee@...nel.org>, Pavel Machek <pavel@...nel.org>,
	Matthias Fend <matthias.fend@...end.at>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Paul Elder <paul.elder@...asonboard.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Horatiu Vultur <horatiu.vultur@...rochip.com>,
	UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Mark Brown <broonie@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v2 15/16] property: Drop functions operating on
 "available" child nodes

Hi Sakari,

Thank you for the patch.

On Wed, Sep 24, 2025 at 10:46:01AM +0300, Sakari Ailus wrote:
> fwnode_get_next_available_child_node() and later
> fwnode_for_each_available_child_node() were introduced to mirror the OF
> interface operating on OF nodes. Now that these two are functionally the
> same as the variants without "_available" part, drop the "_available"
> variants.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
> ---
>  drivers/base/property.c  | 30 +-----------------------------
>  include/linux/property.h |  6 ------
>  2 files changed, 1 insertion(+), 35 deletions(-)
> 
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index ff440456af7b..75c3283fb5ca 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -802,35 +802,7 @@ fwnode_get_next_child_node(const struct fwnode_handle *fwnode,
>  EXPORT_SYMBOL_GPL(fwnode_get_next_child_node);
>  
>  /**
> - * fwnode_get_next_available_child_node - Return the next available child node handle for a node
> - * @fwnode: Firmware node to find the next child node for.
> - * @child: Handle to one of the node's child nodes or a %NULL handle.
> - *
> - * The caller is responsible for calling fwnode_handle_put() on the returned
> - * fwnode pointer. Note that this function also puts a reference to @child
> - * unconditionally.
> - */
> -struct fwnode_handle *
> -fwnode_get_next_available_child_node(const struct fwnode_handle *fwnode,
> -				     struct fwnode_handle *child)
> -{
> -	struct fwnode_handle *next_child = child;
> -
> -	if (IS_ERR_OR_NULL(fwnode))
> -		return NULL;
> -
> -	do {
> -		next_child = fwnode_get_next_child_node(fwnode, next_child);
> -		if (!next_child)
> -			return NULL;
> -	} while (!fwnode_device_is_available(next_child));
> -
> -	return next_child;
> -}
> -EXPORT_SYMBOL_GPL(fwnode_get_next_available_child_node);
> -
> -/**
> - * device_get_next_child_node - Return the next available child node handle for a device
> + * device_get_next_child_node - Return the next available child node handle

This last line is an unrelated change. With that fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>

>   * @dev: Device to find the next child node for.
>   * @child: Handle to one of the device's child nodes or a %NULL handle.
>   *
> diff --git a/include/linux/property.h b/include/linux/property.h
> index 8b8bbbe6b5b7..da6202053862 100644
> --- a/include/linux/property.h
> +++ b/include/linux/property.h
> @@ -161,8 +161,6 @@ struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwn,
>  					    unsigned int depth);
>  struct fwnode_handle *fwnode_get_next_child_node(
>  	const struct fwnode_handle *fwnode, struct fwnode_handle *child);
> -struct fwnode_handle *fwnode_get_next_available_child_node(
> -	const struct fwnode_handle *fwnode, struct fwnode_handle *child);
>  
>  #define fwnode_for_each_child_node(fwnode, child)			\
>  	for (child = fwnode_get_next_child_node(fwnode, NULL); child;	\
> @@ -172,10 +170,6 @@ struct fwnode_handle *fwnode_get_next_available_child_node(
>  	fwnode_for_each_child_node(fwnode, child)			\
>  		for_each_if(fwnode_name_eq(child, name))
>  
> -#define fwnode_for_each_available_child_node(fwnode, child)		       \
> -	for (child = fwnode_get_next_available_child_node(fwnode, NULL); child;\
> -	     child = fwnode_get_next_available_child_node(fwnode, child))
> -
>  struct fwnode_handle *device_get_next_child_node(const struct device *dev,
>  						 struct fwnode_handle *child);
>  

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ