All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <qemu@ben.fluff.org>
To: qemu-devel@nongnu.org
Cc: qemu-riscv@nongnu.org, Alistair.Francis@wdc.com,
	peter.maydell@linaro.org, qemu-arm@nongnu.org,
	Ben Dooks <qemu@ben.fluff.org>
Subject: [PATCH v4 5/6] hw/mips: use qemu_fdt_setprop_strings()
Date: Tue,  9 Aug 2022 19:56:39 +0100	[thread overview]
Message-ID: <20220809185639.750345-6-qemu@ben.fluff.org> (raw)
In-Reply-To: <20220809185639.750345-1-qemu@ben.fluff.org>

Change to using qemu_fdt_setprop_strings() helper in hw/mips.

Signed-off-by: Ben Dooks <qemu@ben.fluff.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/mips/boston.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index d2ab9da1a0..759f6daafe 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -515,9 +515,6 @@ static const void *create_fdt(BostonState *s,
     MachineState *mc = s->mach;
     uint32_t platreg_ph, gic_ph, clk_ph;
     char *name, *gic_name, *platreg_name, *stdout_name;
-    static const char * const syscon_compat[2] = {
-        "img,boston-platform-regs", "syscon"
-    };
 
     fdt = create_device_tree(dt_size);
     if (!fdt) {
@@ -608,9 +605,8 @@ static const void *create_fdt(BostonState *s,
     platreg_name = g_strdup_printf("/soc/system-controller@%" HWADDR_PRIx,
                                    memmap[BOSTON_PLATREG].base);
     qemu_fdt_add_subnode(fdt, platreg_name);
-    qemu_fdt_setprop_string_array(fdt, platreg_name, "compatible",
-                                 (char **)&syscon_compat,
-                                 ARRAY_SIZE(syscon_compat));
+    qemu_fdt_setprop_strings(fdt, platreg_name, "compatible",
+                             "img,boston-platform-regs", "syscon");
     qemu_fdt_setprop_cells(fdt, platreg_name, "reg",
                            memmap[BOSTON_PLATREG].base,
                            memmap[BOSTON_PLATREG].size);
-- 
2.35.1



  parent reply	other threads:[~2022-08-09 19:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 18:56 add qemu_fdt_setprop_strings() and use it in most places Ben Dooks
2022-08-09 18:56 ` [PATCH v4 1/6] device_tree: add qemu_fdt_setprop_strings() helper Ben Dooks
2022-08-10 12:19   ` Andrew Jones
2022-08-09 18:56 ` [PATCH v4 2/6] hw/core: don't check return on qemu_fdt_setprop_string_array() Ben Dooks
2022-08-10 12:28   ` Andrew Jones
2022-08-10 21:58   ` Alistair Francis
2022-08-09 18:56 ` [PATCH v4 3/6] hw/riscv: use qemu_fdt_setprop_strings() for string arrays Ben Dooks
2022-08-10 12:34   ` Andrew Jones
2022-08-10 22:02   ` Alistair Francis
2022-08-09 18:56 ` [PATCH v4 4/6] hw/core: use qemu_fdt_setprop_strings() Ben Dooks
2022-08-10 12:35   ` Andrew Jones
2022-08-10 21:59   ` Alistair Francis
2022-08-09 18:56 ` Ben Dooks [this message]
2022-08-10 12:36   ` [PATCH v4 5/6] hw/mips: " Andrew Jones
2022-08-10 22:07   ` Alistair Francis
2022-08-09 18:56 ` [PATCH v4 6/6] hw/arm: change to " Ben Dooks
2022-08-10 12:41   ` Andrew Jones
2022-08-09 19:12 ` add qemu_fdt_setprop_strings() and use it in most places Ben Dooks
2022-08-12 10:30 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220809185639.750345-6-qemu@ben.fluff.org \
    --to=qemu@ben.fluff.org \
    --cc=Alistair.Francis@wdc.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.