mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 08:00:26 +09:00
spl: fit: Remove useless loop in spl_fit_get_image_name()
When a desired configuration is not found, conf_node will have a negative value. Thus the for loop will start at the root "/" node of the image, print the "/description" property, and stop. It appears the intent of the loop was to print the names of the subnodes under "/configurations". We would need the offset to the "/configurations" node, which is abstracted by fit_find_config_node(). This change agrees that abstracting the node offset is the correct design, and we shouldn't be parsing the configurations manually. Thus the loop in spl_fit_get_image_name() is useless. Remove it. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
3dc2079733
commit
e4928270a4
@ -89,18 +89,8 @@ static int spl_fit_get_image_name(const struct spl_fit_info *ctx,
|
|||||||
bool found = true;
|
bool found = true;
|
||||||
|
|
||||||
conf_node = fit_find_config_node(ctx->fit);
|
conf_node = fit_find_config_node(ctx->fit);
|
||||||
if (conf_node < 0) {
|
if (conf_node < 0)
|
||||||
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
|
|
||||||
printf("No matching DT out of these options:\n");
|
|
||||||
for (node = fdt_first_subnode(ctx->fit, conf_node);
|
|
||||||
node >= 0;
|
|
||||||
node = fdt_next_subnode(ctx->fit, node)) {
|
|
||||||
name = fdt_getprop(ctx->fit, node, "description", &len);
|
|
||||||
printf(" %s\n", name);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return conf_node;
|
return conf_node;
|
||||||
}
|
|
||||||
|
|
||||||
name = fdt_getprop(ctx->fit, conf_node, type, &len);
|
name = fdt_getprop(ctx->fit, conf_node, type, &len);
|
||||||
if (!name) {
|
if (!name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user