Change to using the qemu_fdt_setprop_strings() helper in
hw/core code.
Signed-off-by: Ben Dooks <[email protected]>
---
hw/core/guest-loader.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/hw/core/guest-loader.c b/hw/core/guest-loader.c
index 391c875a29..203090503e 100644
--- a/hw/core/guest-loader.c
+++ b/hw/core/guest-loader.c
@@ -56,10 +56,8 @@ static void loader_insert_platform_data(GuestLoaderState *s,
int size,
qemu_fdt_setprop(fdt, node, "reg", ®_attr, sizeof(reg_attr));
if (s->kernel) {
- const char *compat[2] = { "multiboot,module", "multiboot,kernel" };
- if (qemu_fdt_setprop_string_array(fdt, node, "compatible",
- (char **) &compat,
- ARRAY_SIZE(compat)) < 0) {
+ if (qemu_fdt_setprop_strings(fdt, node, "compatible",
+ "multiboot,module", "multiboot,kernel") <
0) {
error_setg(errp, "couldn't set %s/compatible", node);
return;
}
@@ -69,10 +67,8 @@ static void loader_insert_platform_data(GuestLoaderState *s,
int size,
}
}
} else if (s->initrd) {
- const char *compat[2] = { "multiboot,module", "multiboot,ramdisk" };
- if (qemu_fdt_setprop_string_array(fdt, node, "compatible",
- (char **) &compat,
- ARRAY_SIZE(compat)) < 0) {
+ if (qemu_fdt_setprop_strings(fdt, node, "compatible",
+ "multiboot,module", "multiboot,ramdisk")
< 0) {
error_setg(errp, "couldn't set %s/compatible", node);
return;
}
--
2.35.1