提交 022fe6bc 编写于 作者: A Andy Shevchenko 提交者: Rafael J. Wysocki

device property: Drop 'test' prefix in parameters of fwnode_is_ancestor_of()

The part 'is' in the function name implies the test against something.
Drop unnecessary 'test' prefix in the fwnode_is_ancestor_of() parameters.

No functional change intended.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 87ffea09
...@@ -656,28 +656,26 @@ struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode, ...@@ -656,28 +656,26 @@ struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode,
EXPORT_SYMBOL_GPL(fwnode_get_nth_parent); EXPORT_SYMBOL_GPL(fwnode_get_nth_parent);
/** /**
* fwnode_is_ancestor_of - Test if @test_ancestor is ancestor of @test_child * fwnode_is_ancestor_of - Test if @ancestor is ancestor of @child
* @test_ancestor: Firmware which is tested for being an ancestor * @ancestor: Firmware which is tested for being an ancestor
* @test_child: Firmware which is tested for being the child * @child: Firmware which is tested for being the child
* *
* A node is considered an ancestor of itself too. * A node is considered an ancestor of itself too.
* *
* Returns true if @test_ancestor is an ancestor of @test_child. * Returns true if @ancestor is an ancestor of @child. Otherwise, returns false.
* Otherwise, returns false.
*/ */
bool fwnode_is_ancestor_of(struct fwnode_handle *test_ancestor, bool fwnode_is_ancestor_of(struct fwnode_handle *ancestor, struct fwnode_handle *child)
struct fwnode_handle *test_child)
{ {
struct fwnode_handle *parent; struct fwnode_handle *parent;
if (IS_ERR_OR_NULL(test_ancestor)) if (IS_ERR_OR_NULL(ancestor))
return false; return false;
if (test_child == test_ancestor) if (child == ancestor)
return true; return true;
fwnode_for_each_parent_node(test_child, parent) { fwnode_for_each_parent_node(child, parent) {
if (parent == test_ancestor) { if (parent == ancestor) {
fwnode_handle_put(parent); fwnode_handle_put(parent);
return true; return true;
} }
......
...@@ -95,8 +95,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode); ...@@ -95,8 +95,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode);
unsigned int fwnode_count_parents(const struct fwnode_handle *fwn); unsigned int fwnode_count_parents(const struct fwnode_handle *fwn);
struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwn, struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwn,
unsigned int depth); unsigned int depth);
bool fwnode_is_ancestor_of(struct fwnode_handle *test_ancestor, bool fwnode_is_ancestor_of(struct fwnode_handle *ancestor, struct fwnode_handle *child);
struct fwnode_handle *test_child);
struct fwnode_handle *fwnode_get_next_child_node( struct fwnode_handle *fwnode_get_next_child_node(
const struct fwnode_handle *fwnode, struct fwnode_handle *child); const struct fwnode_handle *fwnode, struct fwnode_handle *child);
struct fwnode_handle *fwnode_get_next_available_child_node( struct fwnode_handle *fwnode_get_next_available_child_node(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册