fix(fdt): avoid output on missing DT property

When we use our fdt_read_uint32* helper functions, we output a warning
on not finding the requested property.

However non-existing properties are not that uncommon, and *trying* to
read such a property is actually a nice way of checking its existence.

Since we already return a specific error value in this case, the caller
can easily check this and give a more specific error message, if needed.
When the caller decides to properly handle the error (fallback, default
value, etc), a message on the console is quite misleading.

Demote the message to a VERBOSE, so normal builds will not spam the
console with pointless messages.

Change-Id: I7a279a4ee0147c5f4a0503d0a8745c6cfea58be5
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
Andre Przywara 2021-09-02 17:00:06 +01:00
parent d7e39c43f2
commit 49e789e353
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ int fdt_read_uint32_array(const void *dtb, int node, const char *prop_name,
/* Access property and obtain its length (in bytes) */
prop = fdt_getprop(dtb, node, prop_name, &value_len);
if (prop == NULL) {
WARN("Couldn't find property %s in dtb\n", prop_name);
VERBOSE("Couldn't find property %s in dtb\n", prop_name);
return -FDT_ERR_NOTFOUND;
}