mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
device_tree: qemu_fdt_getprop_cell converted to use the error API
This patch aligns the prototype with qemu_fdt_getprop. The caller can choose whether the function self-asserts on error (passing &error_fatal as Error ** argument, corresponding to the legacy behavior), or behaves differently such as simply output a message. In this later case the caller can use the new lenp parameter to interpret the error if any. Signed-off-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
78e24f235e
commit
58e71097ce
4 changed files with 35 additions and 12 deletions
|
@ -478,8 +478,10 @@ static void vexpress_modify_dtb(const struct arm_boot_info *info, void *fdt)
|
|||
uint32_t acells, scells, intc;
|
||||
const VEDBoardInfo *daughterboard = (const VEDBoardInfo *)info;
|
||||
|
||||
acells = qemu_fdt_getprop_cell(fdt, "/", "#address-cells");
|
||||
scells = qemu_fdt_getprop_cell(fdt, "/", "#size-cells");
|
||||
acells = qemu_fdt_getprop_cell(fdt, "/", "#address-cells",
|
||||
NULL, &error_fatal);
|
||||
scells = qemu_fdt_getprop_cell(fdt, "/", "#size-cells",
|
||||
NULL, &error_fatal);
|
||||
intc = find_int_controller(fdt);
|
||||
if (!intc) {
|
||||
/* Not fatal, we just won't provide virtio. This will
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue