From: "Michael S. Tsirkin" <mst@redhat.com> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au> Subject: [PATCH] ppc: function to setup latest class options Date: Fri, 7 Feb 2020 01:46:37 -0500 [thread overview] Message-ID: <20200207064628.1196095-1-mst@redhat.com> (raw) We are going to add more init for the latest machine, so move the setup to a function so we don't have to change the DEFINE_SPAPR_MACHINE macro each time. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- hw/ppc/spapr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 02cf53fc5b..4cf2a992a5 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4428,6 +4428,12 @@ static const TypeInfo spapr_machine_info = { }, }; +static void spapr_machine_latest_class_options(MachineClass *mc) +{ + mc->alias = "pseries"; + mc->is_default = 1; +} + #define DEFINE_SPAPR_MACHINE(suffix, verstr, latest) \ static void spapr_machine_##suffix##_class_init(ObjectClass *oc, \ void *data) \ @@ -4435,8 +4441,7 @@ static const TypeInfo spapr_machine_info = { MachineClass *mc = MACHINE_CLASS(oc); \ spapr_machine_##suffix##_class_options(mc); \ if (latest) { \ - mc->alias = "pseries"; \ - mc->is_default = 1; \ + spapr_machine_latest_class_options(mc); \ } \ } \ static const TypeInfo spapr_machine_##suffix##_info = { \ -- MST
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au> Subject: [PATCH] ppc: function to setup latest class options Date: Fri, 7 Feb 2020 01:48:02 -0500 [thread overview] Message-ID: <20200207064628.1196095-1-mst@redhat.com> (raw) Message-ID: <20200207064802.SjbdZ4giQia9rA5LvLDsH122_6LzB5hSoNVEUdmkVY8@z> (raw) We are going to add more init for the latest machine, so move the setup to a function so we don't have to change the DEFINE_SPAPR_MACHINE macro each time. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- hw/ppc/spapr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 02cf53fc5b..4cf2a992a5 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4428,6 +4428,12 @@ static const TypeInfo spapr_machine_info = { }, }; +static void spapr_machine_latest_class_options(MachineClass *mc) +{ + mc->alias = "pseries"; + mc->is_default = 1; +} + #define DEFINE_SPAPR_MACHINE(suffix, verstr, latest) \ static void spapr_machine_##suffix##_class_init(ObjectClass *oc, \ void *data) \ @@ -4435,8 +4441,7 @@ static const TypeInfo spapr_machine_info = { MachineClass *mc = MACHINE_CLASS(oc); \ spapr_machine_##suffix##_class_options(mc); \ if (latest) { \ - mc->alias = "pseries"; \ - mc->is_default = 1; \ + spapr_machine_latest_class_options(mc); \ } \ } \ static const TypeInfo spapr_machine_##suffix##_info = { \ -- MST
next reply other threads:[~2020-02-07 6:48 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-07 6:46 Michael S. Tsirkin [this message] 2020-02-07 6:48 ` [PATCH] ppc: function to setup latest class options Michael S. Tsirkin 2020-02-07 8:39 ` Laurent Vivier 2020-02-07 10:14 ` Greg Kurz 2020-02-07 10:35 ` Philippe Mathieu-Daudé 2020-02-07 11:12 ` Greg Kurz 2020-02-07 14:27 ` Michael S. Tsirkin 2020-02-08 11:12 ` David Gibson
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=20200207064628.1196095-1-mst@redhat.com \ --to=mst@redhat.com \ --cc=david@gibson.dropbear.id.au \ --cc=qemu-devel@nongnu.org \ --cc=qemu-ppc@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: linkBe 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.