[PATCH v2 25/45] dm: core: Rename ofnode_get_first/next_property()
Simon Glass
sjg at chromium.org
Wed Sep 7 04:27:13 CEST 2022
Drop the 'get' in these names since it does not fit with the rest of
the API.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
drivers/core/ofnode.c | 4 ++--
drivers/core/read.c | 4 ++--
env/common.c | 4 ++--
include/dm/ofnode.h | 8 ++++----
include/dm/read.h | 6 +++---
test/dm/ofread.c | 4 ++--
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index ac6d259601c..0ed6e905a50 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -718,7 +718,7 @@ const void *ofnode_get_property(ofnode node, const char *propname, int *lenp)
propname, lenp);
}
-int ofnode_get_first_property(ofnode node, struct ofprop *prop)
+int ofnode_first_property(ofnode node, struct ofprop *prop)
{
prop->node = node;
@@ -737,7 +737,7 @@ int ofnode_get_first_property(ofnode node, struct ofprop *prop)
return 0;
}
-int ofnode_get_next_property(struct ofprop *prop)
+int ofnode_next_property(struct ofprop *prop)
{
if (ofnode_is_np(prop->node)) {
prop->prop = of_get_next_property(ofnode_to_np(prop->node),
diff --git a/drivers/core/read.c b/drivers/core/read.c
index c73508d2760..f121122d13f 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -266,12 +266,12 @@ const void *dev_read_prop(const struct udevice *dev, const char *propname,
int dev_read_first_prop(const struct udevice *dev, struct ofprop *prop)
{
- return ofnode_get_first_property(dev_ofnode(dev), prop);
+ return ofnode_first_property(dev_ofnode(dev), prop);
}
int dev_read_next_prop(struct ofprop *prop)
{
- return ofnode_get_next_property(prop);
+ return ofnode_next_property(prop);
}
const void *dev_read_prop_by_prop(struct ofprop *prop,
diff --git a/env/common.c b/env/common.c
index f9226e0690d..84f1d112de2 100644
--- a/env/common.c
+++ b/env/common.c
@@ -539,9 +539,9 @@ void env_import_fdt(void)
return;
}
- for (res = ofnode_get_first_property(node, &prop);
+ for (res = ofnode_first_property(node, &prop);
!res;
- res = ofnode_get_next_property(&prop)) {
+ res = ofnode_next_property(&prop)) {
const char *name, *val;
val = ofnode_get_property_by_prop(&prop, &name, NULL);
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index ee762442784..f2e89d4febe 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -759,7 +759,7 @@ int ofnode_decode_display_timing(ofnode node, int index,
const void *ofnode_get_property(ofnode node, const char *propname, int *lenp);
/**
- * ofnode_get_first_property()- get the reference of the first property
+ * ofnode_first_property()- get the reference of the first property
*
* Get reference to the first property of the node, it is used to iterate
* and read all the property with ofnode_get_property_by_prop().
@@ -768,10 +768,10 @@ const void *ofnode_get_property(ofnode node, const char *propname, int *lenp);
* @prop: place to put argument reference
* Return: 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found
*/
-int ofnode_get_first_property(ofnode node, struct ofprop *prop);
+int ofnode_first_property(ofnode node, struct ofprop *prop);
/**
- * ofnode_get_next_property() - get the reference of the next property
+ * ofnode_next_property() - get the reference of the next property
*
* Get reference to the next property of the node, it is used to iterate
* and read all the property with ofnode_get_property_by_prop().
@@ -779,7 +779,7 @@ int ofnode_get_first_property(ofnode node, struct ofprop *prop);
* @prop: reference of current argument and place to put reference of next one
* Return: 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found
*/
-int ofnode_get_next_property(struct ofprop *prop);
+int ofnode_next_property(struct ofprop *prop);
/**
* ofnode_get_property_by_prop() - get a pointer to the value of a property
diff --git a/include/dm/read.h b/include/dm/read.h
index 1b54b69acf0..645549c3223 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -528,7 +528,7 @@ const void *dev_read_prop(const struct udevice *dev, const char *propname,
int dev_read_first_prop(const struct udevice *dev, struct ofprop *prop);
/**
- * ofnode_get_next_property() - get the reference of the next property
+ * ofnode_next_property() - get the reference of the next property
*
* Get reference to the next property of the node, it is used to iterate
* and read all the property with dev_read_prop_by_prop().
@@ -1014,12 +1014,12 @@ static inline const void *dev_read_prop(const struct udevice *dev,
static inline int dev_read_first_prop(const struct udevice *dev, struct ofprop *prop)
{
- return ofnode_get_first_property(dev_ofnode(dev), prop);
+ return ofnode_first_property(dev_ofnode(dev), prop);
}
static inline int dev_read_next_prop(struct ofprop *prop)
{
- return ofnode_get_next_property(prop);
+ return ofnode_next_property(prop);
}
static inline const void *dev_read_prop_by_prop(struct ofprop *prop,
diff --git a/test/dm/ofread.c b/test/dm/ofread.c
index 8c7dd825136..95a24c3f42b 100644
--- a/test/dm/ofread.c
+++ b/test/dm/ofread.c
@@ -14,9 +14,9 @@ static int dm_test_ofnode_get_property_by_prop(struct unit_test_state *uts)
int res, len, count = 0;
node = ofnode_path("/cros-ec/flash");
- for (res = ofnode_get_first_property(node, &prop);
+ for (res = ofnode_first_property(node, &prop);
!res;
- res = ofnode_get_next_property(&prop)) {
+ res = ofnode_next_property(&prop)) {
value = ofnode_get_property_by_prop(&prop, &propname, &len);
ut_assertnonnull(value);
switch (count) {
--
2.37.2.789.g6183377224-goog
More information about the U-Boot
mailing list