[PATCH 13/32] spl: Use the correct FIT_..._PROP constants
Simon Glass
sjg at chromium.org
Wed Aug 30 20:04:44 CEST 2023
Rather than open-coding the property names, use the existing constants
provided for this purpose. This better aligns the simple-FIT code with
the full FIT implementation.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
common/spl/spl_fit.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 5b5f6c62045..03ff9a5db9a 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -43,7 +43,7 @@ static int find_node_from_desc(const void *fit, int node, const char *str)
for (child = fdt_first_subnode(fit, node); child >= 0;
child = fdt_next_subnode(fit, child)) {
int len;
- const char *desc = fdt_getprop(fit, child, "description", &len);
+ const char *desc = fdt_getprop(fit, child, FIT_DESC_PROP, &len);
if (!desc)
continue;
@@ -475,10 +475,11 @@ static int spl_fit_record_loadable(const struct spl_fit_info *ctx, int index,
node = spl_fit_get_image_node(ctx, "loadables", index);
ret = fdt_record_loadable(blob, index, name, image->load_addr,
- image->size, image->entry_point,
- fdt_getprop(ctx->fit, node, "type", NULL),
- fdt_getprop(ctx->fit, node, "os", NULL),
- fdt_getprop(ctx->fit, node, "arch", NULL));
+ image->size, image->entry_point,
+ fdt_getprop(ctx->fit, node, FIT_TYPE_PROP, NULL),
+ fdt_getprop(ctx->fit, node, FIT_OS_PROP, NULL),
+ fdt_getprop(ctx->fit, node, FIT_ARCH_PROP, NULL));
+
return ret;
}
--
2.42.0.rc2.253.gd59a3bf2b4-goog
More information about the U-Boot
mailing list