diff mbox series

[v3,3/5] hw/core: use qemu_fdt_setprop_strings()

Message ID 20220727223905.624285-4-qemu@ben.fluff.org (mailing list archive)
State New, archived
Headers show
Series [v3,1/5] device_tree: add qemu_fdt_setprop_strings() helper | expand

Commit Message

Ben Dooks July 27, 2022, 10:39 p.m. UTC
Change to using the qemu_fdt_setprop_strings() helper in
hw/core code.

Signed-off-by: Ben Dooks <qemu@ben.fluff.org>
---
 hw/core/guest-loader.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Peter Maydell Aug. 1, 2022, 11:30 a.m. UTC | #1
On Wed, 27 Jul 2022 at 23:39, Ben Dooks <qemu@ben.fluff.org> wrote:
>
> Change to using the qemu_fdt_setprop_strings() helper in
> hw/core code.
>
> Signed-off-by: Ben Dooks <qemu@ben.fluff.org>
> ---

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
Ben Dooks Aug. 9, 2022, 6:50 p.m. UTC | #2
On Mon, Aug 01, 2022 at 12:30:22PM +0100, Peter Maydell wrote:
> On Wed, 27 Jul 2022 at 23:39, Ben Dooks <qemu@ben.fluff.org> wrote:
> >
> > Change to using the qemu_fdt_setprop_strings() helper in
> > hw/core code.
> >
> > Signed-off-by: Ben Dooks <qemu@ben.fluff.org>
> > ---
> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

I've had to make a second version, so assuming it'll need
reviewing again
Peter Maydell Aug. 9, 2022, 8:49 p.m. UTC | #3
On Tue, 9 Aug 2022 at 19:50, Ben Dooks <ben@fluff.org> wrote:
>
> On Mon, Aug 01, 2022 at 12:30:22PM +0100, Peter Maydell wrote:
> > On Wed, 27 Jul 2022 at 23:39, Ben Dooks <qemu@ben.fluff.org> wrote:
> > >
> > > Change to using the qemu_fdt_setprop_strings() helper in
> > > hw/core code.
> > >
> > > Signed-off-by: Ben Dooks <qemu@ben.fluff.org>
> > > ---
> >
> > Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> I've had to make a second version, so assuming it'll need
> reviewing again

If you didn't change the specific patch that I gave a reviewed-by
tag for, then you should put that tag into the commit message
next to your signed-off-by line in the patch you send in the v2
series, to indicate it's already been reviewed and doesn't need
re-doing in v2.

thanks
-- PMM
diff mbox series

Patch

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", &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;
         }