[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [RFC 5/9] spapr: Use SET_MACHINE_COMPAT
From: |
Thomas Huth |
Subject: |
Re: [Qemu-ppc] [RFC 5/9] spapr: Use SET_MACHINE_COMPAT |
Date: |
Mon, 30 Nov 2015 17:23:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 30/11/15 09:51, David Gibson wrote:
> To make the spapr_machine_*_class_compat() functions a little less bulky.
>
> Signed-off-by: David Gibson <address@hidden>
> ---
> hw/ppc/spapr.c | 28 ++++------------------------
> 1 file changed, 4 insertions(+), 24 deletions(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index ca62343..fae62ce 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -2352,13 +2352,8 @@ DEFINE_SPAPR_MACHINE(2_5, "2.5", NULL);
>
> static void spapr_machine_2_4_class_compat(MachineClass *mc)
> {
> - static GlobalProperty compat_props[] = {
> - SPAPR_COMPAT_2_4
> - { /* end of list */ }
> - };
> -
> mc->desc = "pSeries Logical Partition (PAPR compliant) v2.4";
> - mc->compat_props = compat_props;
> + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_4);
> }
>
> DEFINE_SPAPR_MACHINE(2_4, "2.4", NULL);
> @@ -2383,13 +2378,8 @@ static void
> spapr_machine_2_3_instance_compat(MachineState *machine)
>
> static void spapr_machine_2_3_class_compat(MachineClass *mc)
> {
> - static GlobalProperty compat_props[] = {
> - SPAPR_COMPAT_2_3
> - { /* end of list */ }
> - };
> -
> mc->desc = "pSeries Logical Partition (PAPR compliant) v2.3";
> - mc->compat_props = compat_props;
> + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_3);
> }
> DEFINE_SPAPR_MACHINE(2_3, "2.3", spapr_machine_2_3_instance_compat);
>
> @@ -2413,13 +2403,8 @@ static void
> spapr_machine_2_2_instance_compat(MachineState *machine)
>
> static void spapr_machine_2_2_class_compat(MachineClass *mc)
> {
> - static GlobalProperty compat_props[] = {
> - SPAPR_COMPAT_2_2
> - { /* end of list */ }
> - };
> -
> mc->desc = "pSeries Logical Partition (PAPR compliant) v2.2";
> - mc->compat_props = compat_props;
> + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_2);
> }
> DEFINE_SPAPR_MACHINE(2_2, "2.2", spapr_machine_2_2_instance_compat);
>
> @@ -2437,13 +2422,8 @@ static void
> spapr_machine_2_1_instance_compat(MachineState *machine)
>
> static void spapr_machine_2_1_class_compat(MachineClass *mc)
> {
> - static GlobalProperty compat_props[] = {
> - SPAPR_COMPAT_2_1
> - { /* end of list */ }
> - };
> -
> mc->desc = "pSeries Logical Partition (PAPR compliant) v2.1";
> - mc->compat_props = compat_props;
> + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_1);
> }
> DEFINE_SPAPR_MACHINE(2_1, "2.1", spapr_machine_2_1_instance_compat);
Reviewed-by: Thomas Huth <address@hidden>