diff mbox series

[1/3] spapr: Eliminate SPAPR_PCI_2_7_MMIO_WIN_SIZE macro

Message ID 20190107193020.21744-2-ehabkost@redhat.com
State New
Headers show
Series machine: Make compat_props arrays shorter and more readable | expand

Commit Message

Eduardo Habkost Jan. 7, 2019, 7:30 p.m. UTC
The macro is only used in one place, where the purpose of the
value is obvious.  Eliminate the macro so we don't need to rely
on stringify().

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/hw/pci-host/spapr.h | 1 -
 hw/ppc/spapr.c              | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Marc-André Lureau Jan. 7, 2019, 7:35 p.m. UTC | #1
On Mon, Jan 7, 2019 at 11:34 PM Eduardo Habkost <ehabkost@redhat.com> wrote:
>
> The macro is only used in one place, where the purpose of the
> value is obvious.  Eliminate the macro so we don't need to rely
> on stringify().
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  include/hw/pci-host/spapr.h | 1 -
>  hw/ppc/spapr.c              | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
> index 7c66c3872f..a85a995b6c 100644
> --- a/include/hw/pci-host/spapr.h
> +++ b/include/hw/pci-host/spapr.h
> @@ -99,7 +99,6 @@ struct sPAPRPHBState {
>  #define SPAPR_PCI_BASE               (1ULL << 45) /* 32 TiB */
>  #define SPAPR_PCI_LIMIT              (1ULL << 46) /* 64 TiB */
>
> -#define SPAPR_PCI_2_7_MMIO_WIN_SIZE  0xf80000000
>  #define SPAPR_PCI_IO_WIN_SIZE        0x10000
>
>  #define SPAPR_PCI_MSI_WINDOW         0x40000000000ULL
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 5671608cea..bff42f0adb 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -4225,7 +4225,7 @@ static void spapr_machine_2_7_class_options(MachineClass *mc)
>          {
>              .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,
>              .property = "mem_win_size",
> -            .value    = stringify(SPAPR_PCI_2_7_MMIO_WIN_SIZE),
> +            .value    = "0xf80000000",
>          },
>          {
>              .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,
> --
> 2.18.0.rc1.1.g3f1ff2140
>
>
David Gibson Jan. 8, 2019, 12:07 a.m. UTC | #2
On Mon, Jan 07, 2019 at 05:30:18PM -0200, Eduardo Habkost wrote:
> The macro is only used in one place, where the purpose of the
> value is obvious.  Eliminate the macro so we don't need to rely
> on stringify().
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  include/hw/pci-host/spapr.h | 1 -
>  hw/ppc/spapr.c              | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
> index 7c66c3872f..a85a995b6c 100644
> --- a/include/hw/pci-host/spapr.h
> +++ b/include/hw/pci-host/spapr.h
> @@ -99,7 +99,6 @@ struct sPAPRPHBState {
>  #define SPAPR_PCI_BASE               (1ULL << 45) /* 32 TiB */
>  #define SPAPR_PCI_LIMIT              (1ULL << 46) /* 64 TiB */
>  
> -#define SPAPR_PCI_2_7_MMIO_WIN_SIZE  0xf80000000
>  #define SPAPR_PCI_IO_WIN_SIZE        0x10000
>  
>  #define SPAPR_PCI_MSI_WINDOW         0x40000000000ULL
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 5671608cea..bff42f0adb 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -4225,7 +4225,7 @@ static void spapr_machine_2_7_class_options(MachineClass *mc)
>          {
>              .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,
>              .property = "mem_win_size",
> -            .value    = stringify(SPAPR_PCI_2_7_MMIO_WIN_SIZE),
> +            .value    = "0xf80000000",
>          },
>          {
>              .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,
Cornelia Huck Jan. 8, 2019, 9:59 a.m. UTC | #3
On Mon,  7 Jan 2019 17:30:18 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> The macro is only used in one place, where the purpose of the
> value is obvious.  Eliminate the macro so we don't need to rely
> on stringify().
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  include/hw/pci-host/spapr.h | 1 -
>  hw/ppc/spapr.c              | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
diff mbox series

Patch

diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index 7c66c3872f..a85a995b6c 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -99,7 +99,6 @@  struct sPAPRPHBState {
 #define SPAPR_PCI_BASE               (1ULL << 45) /* 32 TiB */
 #define SPAPR_PCI_LIMIT              (1ULL << 46) /* 64 TiB */
 
-#define SPAPR_PCI_2_7_MMIO_WIN_SIZE  0xf80000000
 #define SPAPR_PCI_IO_WIN_SIZE        0x10000
 
 #define SPAPR_PCI_MSI_WINDOW         0x40000000000ULL
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 5671608cea..bff42f0adb 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4225,7 +4225,7 @@  static void spapr_machine_2_7_class_options(MachineClass *mc)
         {
             .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,
             .property = "mem_win_size",
-            .value    = stringify(SPAPR_PCI_2_7_MMIO_WIN_SIZE),
+            .value    = "0xf80000000",
         },
         {
             .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,