Skip to content

Commit 022fe6b

Browse files
andy-shevrafaeljw
authored andcommitted
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 87ffea0 commit 022fe6b

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

drivers/base/property.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -656,28 +656,26 @@ struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode,
656656
EXPORT_SYMBOL_GPL(fwnode_get_nth_parent);
657657

658658
/**
659-
* fwnode_is_ancestor_of - Test if @test_ancestor is ancestor of @test_child
660-
* @test_ancestor: Firmware which is tested for being an ancestor
661-
* @test_child: Firmware which is tested for being the child
659+
* fwnode_is_ancestor_of - Test if @ancestor is ancestor of @child
660+
* @ancestor: Firmware which is tested for being an ancestor
661+
* @child: Firmware which is tested for being the child
662662
*
663663
* A node is considered an ancestor of itself too.
664664
*
665-
* Returns true if @test_ancestor is an ancestor of @test_child.
666-
* Otherwise, returns false.
665+
* Returns true if @ancestor is an ancestor of @child. Otherwise, returns false.
667666
*/
668-
bool fwnode_is_ancestor_of(struct fwnode_handle *test_ancestor,
669-
struct fwnode_handle *test_child)
667+
bool fwnode_is_ancestor_of(struct fwnode_handle *ancestor, struct fwnode_handle *child)
670668
{
671669
struct fwnode_handle *parent;
672670

673-
if (IS_ERR_OR_NULL(test_ancestor))
671+
if (IS_ERR_OR_NULL(ancestor))
674672
return false;
675673

676-
if (test_child == test_ancestor)
674+
if (child == ancestor)
677675
return true;
678676

679-
fwnode_for_each_parent_node(test_child, parent) {
680-
if (parent == test_ancestor) {
677+
fwnode_for_each_parent_node(child, parent) {
678+
if (parent == ancestor) {
681679
fwnode_handle_put(parent);
682680
return true;
683681
}

include/linux/property.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode);
9595
unsigned int fwnode_count_parents(const struct fwnode_handle *fwn);
9696
struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwn,
9797
unsigned int depth);
98-
bool fwnode_is_ancestor_of(struct fwnode_handle *test_ancestor,
99-
struct fwnode_handle *test_child);
98+
bool fwnode_is_ancestor_of(struct fwnode_handle *ancestor, struct fwnode_handle *child);
10099
struct fwnode_handle *fwnode_get_next_child_node(
101100
const struct fwnode_handle *fwnode, struct fwnode_handle *child);
102101
struct fwnode_handle *fwnode_get_next_available_child_node(

0 commit comments

Comments
 (0)