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 |
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
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
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 --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; }
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(-)