diff mbox series

exec/memory: Use struct Object typedef

Message ID 20210225182003.3629342-1-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series exec/memory: Use struct Object typedef | expand

Commit Message

Philippe Mathieu-Daudé Feb. 25, 2021, 6:20 p.m. UTC
We forward-declare Object typedef in "qemu/typedefs.h" since commit
ca27b5eb7cd ("qom/object: Move Object typedef to 'qemu/typedefs.h'").
Use it everywhere to make the code simpler.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 include/exec/memory.h      | 32 ++++++++++++++++----------------
 include/hw/ppc/pnv_xscom.h |  2 +-
 hw/ppc/pnv_xscom.c         |  2 +-
 softmmu/memory.c           | 12 ++++++------
 4 files changed, 24 insertions(+), 24 deletions(-)

Comments

David Gibson Feb. 25, 2021, 11:55 p.m. UTC | #1
On Thu, Feb 25, 2021 at 07:20:03PM +0100, Philippe Mathieu-Daudé wrote:
> We forward-declare Object typedef in "qemu/typedefs.h" since commit
> ca27b5eb7cd ("qom/object: Move Object typedef to 'qemu/typedefs.h'").
> Use it everywhere to make the code simpler.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

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

> ---
>  include/exec/memory.h      | 32 ++++++++++++++++----------------
>  include/hw/ppc/pnv_xscom.h |  2 +-
>  hw/ppc/pnv_xscom.c         |  2 +-
>  softmmu/memory.c           | 12 ++++++------
>  4 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index c6fb714e499..54ccf1a5f09 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -828,7 +828,7 @@ static inline bool MemoryRegionSection_eq(MemoryRegionSection *a,
>   * @size: size of the region; any subregions beyond this size will be clipped
>   */
>  void memory_region_init(MemoryRegion *mr,
> -                        struct Object *owner,
> +                        Object *owner,
>                          const char *name,
>                          uint64_t size);
>  
> @@ -876,7 +876,7 @@ void memory_region_unref(MemoryRegion *mr);
>   * @size: size of the region.
>   */
>  void memory_region_init_io(MemoryRegion *mr,
> -                           struct Object *owner,
> +                           Object *owner,
>                             const MemoryRegionOps *ops,
>                             void *opaque,
>                             const char *name,
> @@ -898,7 +898,7 @@ void memory_region_init_io(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_ram_nomigrate(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        Error **errp);
> @@ -920,7 +920,7 @@ void memory_region_init_ram_nomigrate(MemoryRegion *mr,
>   * The only difference is part of the RAM region can be remapped.
>   */
>  void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr,
> -                                             struct Object *owner,
> +                                             Object *owner,
>                                               const char *name,
>                                               uint64_t size,
>                                               bool share,
> @@ -946,7 +946,7 @@ void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_resizeable_ram(MemoryRegion *mr,
> -                                       struct Object *owner,
> +                                       Object *owner,
>                                         const char *name,
>                                         uint64_t size,
>                                         uint64_t max_size,
> @@ -979,7 +979,7 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_ram_from_file(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        uint64_t align,
> @@ -1005,7 +1005,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_ram_from_fd(MemoryRegion *mr,
> -                                    struct Object *owner,
> +                                    Object *owner,
>                                      const char *name,
>                                      uint64_t size,
>                                      bool share,
> @@ -1030,7 +1030,7 @@ void memory_region_init_ram_from_fd(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_ram_ptr(MemoryRegion *mr,
> -                                struct Object *owner,
> +                                Object *owner,
>                                  const char *name,
>                                  uint64_t size,
>                                  void *ptr);
> @@ -1058,7 +1058,7 @@ void memory_region_init_ram_ptr(MemoryRegion *mr,
>   * (For RAM device memory regions, migrating the contents rarely makes sense.)
>   */
>  void memory_region_init_ram_device_ptr(MemoryRegion *mr,
> -                                       struct Object *owner,
> +                                       Object *owner,
>                                         const char *name,
>                                         uint64_t size,
>                                         void *ptr);
> @@ -1076,7 +1076,7 @@ void memory_region_init_ram_device_ptr(MemoryRegion *mr,
>   * @size: size of the region.
>   */
>  void memory_region_init_alias(MemoryRegion *mr,
> -                              struct Object *owner,
> +                              Object *owner,
>                                const char *name,
>                                MemoryRegion *orig,
>                                hwaddr offset,
> @@ -1101,7 +1101,7 @@ void memory_region_init_alias(MemoryRegion *mr,
>   * @errp: pointer to Error*, to store an error if it happens.
>   */
>  void memory_region_init_rom_nomigrate(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        Error **errp);
> @@ -1124,7 +1124,7 @@ void memory_region_init_rom_nomigrate(MemoryRegion *mr,
>   * @errp: pointer to Error*, to store an error if it happens.
>   */
>  void memory_region_init_rom_device_nomigrate(MemoryRegion *mr,
> -                                             struct Object *owner,
> +                                             Object *owner,
>                                               const MemoryRegionOps *ops,
>                                               void *opaque,
>                                               const char *name,
> @@ -1183,7 +1183,7 @@ void memory_region_init_iommu(void *_iommu_mr,
>   * If you pass a non-NULL non-device @owner then we will assert.
>   */
>  void memory_region_init_ram(MemoryRegion *mr,
> -                            struct Object *owner,
> +                            Object *owner,
>                              const char *name,
>                              uint64_t size,
>                              Error **errp);
> @@ -1210,7 +1210,7 @@ void memory_region_init_ram(MemoryRegion *mr,
>   * @errp: pointer to Error*, to store an error if it happens.
>   */
>  void memory_region_init_rom(MemoryRegion *mr,
> -                            struct Object *owner,
> +                            Object *owner,
>                              const char *name,
>                              uint64_t size,
>                              Error **errp);
> @@ -1241,7 +1241,7 @@ void memory_region_init_rom(MemoryRegion *mr,
>   * @errp: pointer to Error*, to store an error if it happens.
>   */
>  void memory_region_init_rom_device(MemoryRegion *mr,
> -                                   struct Object *owner,
> +                                   Object *owner,
>                                     const MemoryRegionOps *ops,
>                                     void *opaque,
>                                     const char *name,
> @@ -1254,7 +1254,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
>   *
>   * @mr: the memory region being queried.
>   */
> -struct Object *memory_region_owner(MemoryRegion *mr);
> +Object *memory_region_owner(MemoryRegion *mr);
>  
>  /**
>   * memory_region_size: get a memory region's size.
> diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
> index 8578f5a207d..2ff9f7a8d6f 100644
> --- a/include/hw/ppc/pnv_xscom.h
> +++ b/include/hw/ppc/pnv_xscom.h
> @@ -139,7 +139,7 @@ int pnv_dt_xscom(PnvChip *chip, void *fdt, int root_offset,
>  void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset,
>                               MemoryRegion *mr);
>  void pnv_xscom_region_init(MemoryRegion *mr,
> -                           struct Object *owner,
> +                           Object *owner,
>                             const MemoryRegionOps *ops,
>                             void *opaque,
>                             const char *name,
> diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
> index e9ae1569ffc..be7018e8ac5 100644
> --- a/hw/ppc/pnv_xscom.c
> +++ b/hw/ppc/pnv_xscom.c
> @@ -308,7 +308,7 @@ void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset, MemoryRegion *mr)
>  }
>  
>  void pnv_xscom_region_init(MemoryRegion *mr,
> -                           struct Object *owner,
> +                           Object *owner,
>                             const MemoryRegionOps *ops,
>                             void *opaque,
>                             const char *name,
> diff --git a/softmmu/memory.c b/softmmu/memory.c
> index 874a8fccdee..91f1bf47c30 100644
> --- a/softmmu/memory.c
> +++ b/softmmu/memory.c
> @@ -1581,7 +1581,7 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
>  
>  #ifdef CONFIG_POSIX
>  void memory_region_init_ram_from_file(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        uint64_t align,
> @@ -1607,7 +1607,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr,
>  }
>  
>  void memory_region_init_ram_from_fd(MemoryRegion *mr,
> -                                    struct Object *owner,
> +                                    Object *owner,
>                                      const char *name,
>                                      uint64_t size,
>                                      bool share,
> @@ -1679,7 +1679,7 @@ void memory_region_init_alias(MemoryRegion *mr,
>  }
>  
>  void memory_region_init_rom_nomigrate(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        Error **errp)
> @@ -3205,7 +3205,7 @@ void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled)
>  }
>  
>  void memory_region_init_ram(MemoryRegion *mr,
> -                            struct Object *owner,
> +                            Object *owner,
>                              const char *name,
>                              uint64_t size,
>                              Error **errp)
> @@ -3229,7 +3229,7 @@ void memory_region_init_ram(MemoryRegion *mr,
>  }
>  
>  void memory_region_init_rom(MemoryRegion *mr,
> -                            struct Object *owner,
> +                            Object *owner,
>                              const char *name,
>                              uint64_t size,
>                              Error **errp)
> @@ -3253,7 +3253,7 @@ void memory_region_init_rom(MemoryRegion *mr,
>  }
>  
>  void memory_region_init_rom_device(MemoryRegion *mr,
> -                                   struct Object *owner,
> +                                   Object *owner,
>                                     const MemoryRegionOps *ops,
>                                     void *opaque,
>                                     const char *name,
Laurent Vivier March 9, 2021, 8:30 p.m. UTC | #2
Le 25/02/2021 à 19:20, Philippe Mathieu-Daudé a écrit :
> We forward-declare Object typedef in "qemu/typedefs.h" since commit
> ca27b5eb7cd ("qom/object: Move Object typedef to 'qemu/typedefs.h'").
> Use it everywhere to make the code simpler.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  include/exec/memory.h      | 32 ++++++++++++++++----------------
>  include/hw/ppc/pnv_xscom.h |  2 +-
>  hw/ppc/pnv_xscom.c         |  2 +-
>  softmmu/memory.c           | 12 ++++++------
>  4 files changed, 24 insertions(+), 24 deletions(-)
> 


Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Laurent Vivier March 9, 2021, 8:55 p.m. UTC | #3
Le 25/02/2021 à 19:20, Philippe Mathieu-Daudé a écrit :
> We forward-declare Object typedef in "qemu/typedefs.h" since commit
> ca27b5eb7cd ("qom/object: Move Object typedef to 'qemu/typedefs.h'").
> Use it everywhere to make the code simpler.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  include/exec/memory.h      | 32 ++++++++++++++++----------------
>  include/hw/ppc/pnv_xscom.h |  2 +-
>  hw/ppc/pnv_xscom.c         |  2 +-
>  softmmu/memory.c           | 12 ++++++------
>  4 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index c6fb714e499..54ccf1a5f09 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -828,7 +828,7 @@ static inline bool MemoryRegionSection_eq(MemoryRegionSection *a,
>   * @size: size of the region; any subregions beyond this size will be clipped
>   */
>  void memory_region_init(MemoryRegion *mr,
> -                        struct Object *owner,
> +                        Object *owner,
>                          const char *name,
>                          uint64_t size);
>  
> @@ -876,7 +876,7 @@ void memory_region_unref(MemoryRegion *mr);
>   * @size: size of the region.
>   */
>  void memory_region_init_io(MemoryRegion *mr,
> -                           struct Object *owner,
> +                           Object *owner,
>                             const MemoryRegionOps *ops,
>                             void *opaque,
>                             const char *name,
> @@ -898,7 +898,7 @@ void memory_region_init_io(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_ram_nomigrate(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        Error **errp);
> @@ -920,7 +920,7 @@ void memory_region_init_ram_nomigrate(MemoryRegion *mr,
>   * The only difference is part of the RAM region can be remapped.
>   */
>  void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr,
> -                                             struct Object *owner,
> +                                             Object *owner,
>                                               const char *name,
>                                               uint64_t size,
>                                               bool share,
> @@ -946,7 +946,7 @@ void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_resizeable_ram(MemoryRegion *mr,
> -                                       struct Object *owner,
> +                                       Object *owner,
>                                         const char *name,
>                                         uint64_t size,
>                                         uint64_t max_size,
> @@ -979,7 +979,7 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_ram_from_file(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        uint64_t align,
> @@ -1005,7 +1005,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_ram_from_fd(MemoryRegion *mr,
> -                                    struct Object *owner,
> +                                    Object *owner,
>                                      const char *name,
>                                      uint64_t size,
>                                      bool share,
> @@ -1030,7 +1030,7 @@ void memory_region_init_ram_from_fd(MemoryRegion *mr,
>   * RAM memory region to be migrated; that is the responsibility of the caller.
>   */
>  void memory_region_init_ram_ptr(MemoryRegion *mr,
> -                                struct Object *owner,
> +                                Object *owner,
>                                  const char *name,
>                                  uint64_t size,
>                                  void *ptr);
> @@ -1058,7 +1058,7 @@ void memory_region_init_ram_ptr(MemoryRegion *mr,
>   * (For RAM device memory regions, migrating the contents rarely makes sense.)
>   */
>  void memory_region_init_ram_device_ptr(MemoryRegion *mr,
> -                                       struct Object *owner,
> +                                       Object *owner,
>                                         const char *name,
>                                         uint64_t size,
>                                         void *ptr);
> @@ -1076,7 +1076,7 @@ void memory_region_init_ram_device_ptr(MemoryRegion *mr,
>   * @size: size of the region.
>   */
>  void memory_region_init_alias(MemoryRegion *mr,
> -                              struct Object *owner,
> +                              Object *owner,
>                                const char *name,
>                                MemoryRegion *orig,
>                                hwaddr offset,
> @@ -1101,7 +1101,7 @@ void memory_region_init_alias(MemoryRegion *mr,
>   * @errp: pointer to Error*, to store an error if it happens.
>   */
>  void memory_region_init_rom_nomigrate(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        Error **errp);
> @@ -1124,7 +1124,7 @@ void memory_region_init_rom_nomigrate(MemoryRegion *mr,
>   * @errp: pointer to Error*, to store an error if it happens.
>   */
>  void memory_region_init_rom_device_nomigrate(MemoryRegion *mr,
> -                                             struct Object *owner,
> +                                             Object *owner,
>                                               const MemoryRegionOps *ops,
>                                               void *opaque,
>                                               const char *name,
> @@ -1183,7 +1183,7 @@ void memory_region_init_iommu(void *_iommu_mr,
>   * If you pass a non-NULL non-device @owner then we will assert.
>   */
>  void memory_region_init_ram(MemoryRegion *mr,
> -                            struct Object *owner,
> +                            Object *owner,
>                              const char *name,
>                              uint64_t size,
>                              Error **errp);
> @@ -1210,7 +1210,7 @@ void memory_region_init_ram(MemoryRegion *mr,
>   * @errp: pointer to Error*, to store an error if it happens.
>   */
>  void memory_region_init_rom(MemoryRegion *mr,
> -                            struct Object *owner,
> +                            Object *owner,
>                              const char *name,
>                              uint64_t size,
>                              Error **errp);
> @@ -1241,7 +1241,7 @@ void memory_region_init_rom(MemoryRegion *mr,
>   * @errp: pointer to Error*, to store an error if it happens.
>   */
>  void memory_region_init_rom_device(MemoryRegion *mr,
> -                                   struct Object *owner,
> +                                   Object *owner,
>                                     const MemoryRegionOps *ops,
>                                     void *opaque,
>                                     const char *name,
> @@ -1254,7 +1254,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
>   *
>   * @mr: the memory region being queried.
>   */
> -struct Object *memory_region_owner(MemoryRegion *mr);
> +Object *memory_region_owner(MemoryRegion *mr);
>  
>  /**
>   * memory_region_size: get a memory region's size.
> diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
> index 8578f5a207d..2ff9f7a8d6f 100644
> --- a/include/hw/ppc/pnv_xscom.h
> +++ b/include/hw/ppc/pnv_xscom.h
> @@ -139,7 +139,7 @@ int pnv_dt_xscom(PnvChip *chip, void *fdt, int root_offset,
>  void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset,
>                               MemoryRegion *mr);
>  void pnv_xscom_region_init(MemoryRegion *mr,
> -                           struct Object *owner,
> +                           Object *owner,
>                             const MemoryRegionOps *ops,
>                             void *opaque,
>                             const char *name,
> diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
> index e9ae1569ffc..be7018e8ac5 100644
> --- a/hw/ppc/pnv_xscom.c
> +++ b/hw/ppc/pnv_xscom.c
> @@ -308,7 +308,7 @@ void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset, MemoryRegion *mr)
>  }
>  
>  void pnv_xscom_region_init(MemoryRegion *mr,
> -                           struct Object *owner,
> +                           Object *owner,
>                             const MemoryRegionOps *ops,
>                             void *opaque,
>                             const char *name,
> diff --git a/softmmu/memory.c b/softmmu/memory.c
> index 874a8fccdee..91f1bf47c30 100644
> --- a/softmmu/memory.c
> +++ b/softmmu/memory.c
> @@ -1581,7 +1581,7 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
>  
>  #ifdef CONFIG_POSIX
>  void memory_region_init_ram_from_file(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        uint64_t align,
> @@ -1607,7 +1607,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr,
>  }
>  
>  void memory_region_init_ram_from_fd(MemoryRegion *mr,
> -                                    struct Object *owner,
> +                                    Object *owner,
>                                      const char *name,
>                                      uint64_t size,
>                                      bool share,
> @@ -1679,7 +1679,7 @@ void memory_region_init_alias(MemoryRegion *mr,
>  }
>  
>  void memory_region_init_rom_nomigrate(MemoryRegion *mr,
> -                                      struct Object *owner,
> +                                      Object *owner,
>                                        const char *name,
>                                        uint64_t size,
>                                        Error **errp)
> @@ -3205,7 +3205,7 @@ void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled)
>  }
>  
>  void memory_region_init_ram(MemoryRegion *mr,
> -                            struct Object *owner,
> +                            Object *owner,
>                              const char *name,
>                              uint64_t size,
>                              Error **errp)
> @@ -3229,7 +3229,7 @@ void memory_region_init_ram(MemoryRegion *mr,
>  }
>  
>  void memory_region_init_rom(MemoryRegion *mr,
> -                            struct Object *owner,
> +                            Object *owner,
>                              const char *name,
>                              uint64_t size,
>                              Error **errp)
> @@ -3253,7 +3253,7 @@ void memory_region_init_rom(MemoryRegion *mr,
>  }
>  
>  void memory_region_init_rom_device(MemoryRegion *mr,
> -                                   struct Object *owner,
> +                                   Object *owner,
>                                     const MemoryRegionOps *ops,
>                                     void *opaque,
>                                     const char *name,
> 

Applied to my trivial-patches branch.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/include/exec/memory.h b/include/exec/memory.h
index c6fb714e499..54ccf1a5f09 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -828,7 +828,7 @@  static inline bool MemoryRegionSection_eq(MemoryRegionSection *a,
  * @size: size of the region; any subregions beyond this size will be clipped
  */
 void memory_region_init(MemoryRegion *mr,
-                        struct Object *owner,
+                        Object *owner,
                         const char *name,
                         uint64_t size);
 
@@ -876,7 +876,7 @@  void memory_region_unref(MemoryRegion *mr);
  * @size: size of the region.
  */
 void memory_region_init_io(MemoryRegion *mr,
-                           struct Object *owner,
+                           Object *owner,
                            const MemoryRegionOps *ops,
                            void *opaque,
                            const char *name,
@@ -898,7 +898,7 @@  void memory_region_init_io(MemoryRegion *mr,
  * RAM memory region to be migrated; that is the responsibility of the caller.
  */
 void memory_region_init_ram_nomigrate(MemoryRegion *mr,
-                                      struct Object *owner,
+                                      Object *owner,
                                       const char *name,
                                       uint64_t size,
                                       Error **errp);
@@ -920,7 +920,7 @@  void memory_region_init_ram_nomigrate(MemoryRegion *mr,
  * The only difference is part of the RAM region can be remapped.
  */
 void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr,
-                                             struct Object *owner,
+                                             Object *owner,
                                              const char *name,
                                              uint64_t size,
                                              bool share,
@@ -946,7 +946,7 @@  void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr,
  * RAM memory region to be migrated; that is the responsibility of the caller.
  */
 void memory_region_init_resizeable_ram(MemoryRegion *mr,
-                                       struct Object *owner,
+                                       Object *owner,
                                        const char *name,
                                        uint64_t size,
                                        uint64_t max_size,
@@ -979,7 +979,7 @@  void memory_region_init_resizeable_ram(MemoryRegion *mr,
  * RAM memory region to be migrated; that is the responsibility of the caller.
  */
 void memory_region_init_ram_from_file(MemoryRegion *mr,
-                                      struct Object *owner,
+                                      Object *owner,
                                       const char *name,
                                       uint64_t size,
                                       uint64_t align,
@@ -1005,7 +1005,7 @@  void memory_region_init_ram_from_file(MemoryRegion *mr,
  * RAM memory region to be migrated; that is the responsibility of the caller.
  */
 void memory_region_init_ram_from_fd(MemoryRegion *mr,
-                                    struct Object *owner,
+                                    Object *owner,
                                     const char *name,
                                     uint64_t size,
                                     bool share,
@@ -1030,7 +1030,7 @@  void memory_region_init_ram_from_fd(MemoryRegion *mr,
  * RAM memory region to be migrated; that is the responsibility of the caller.
  */
 void memory_region_init_ram_ptr(MemoryRegion *mr,
-                                struct Object *owner,
+                                Object *owner,
                                 const char *name,
                                 uint64_t size,
                                 void *ptr);
@@ -1058,7 +1058,7 @@  void memory_region_init_ram_ptr(MemoryRegion *mr,
  * (For RAM device memory regions, migrating the contents rarely makes sense.)
  */
 void memory_region_init_ram_device_ptr(MemoryRegion *mr,
-                                       struct Object *owner,
+                                       Object *owner,
                                        const char *name,
                                        uint64_t size,
                                        void *ptr);
@@ -1076,7 +1076,7 @@  void memory_region_init_ram_device_ptr(MemoryRegion *mr,
  * @size: size of the region.
  */
 void memory_region_init_alias(MemoryRegion *mr,
-                              struct Object *owner,
+                              Object *owner,
                               const char *name,
                               MemoryRegion *orig,
                               hwaddr offset,
@@ -1101,7 +1101,7 @@  void memory_region_init_alias(MemoryRegion *mr,
  * @errp: pointer to Error*, to store an error if it happens.
  */
 void memory_region_init_rom_nomigrate(MemoryRegion *mr,
-                                      struct Object *owner,
+                                      Object *owner,
                                       const char *name,
                                       uint64_t size,
                                       Error **errp);
@@ -1124,7 +1124,7 @@  void memory_region_init_rom_nomigrate(MemoryRegion *mr,
  * @errp: pointer to Error*, to store an error if it happens.
  */
 void memory_region_init_rom_device_nomigrate(MemoryRegion *mr,
-                                             struct Object *owner,
+                                             Object *owner,
                                              const MemoryRegionOps *ops,
                                              void *opaque,
                                              const char *name,
@@ -1183,7 +1183,7 @@  void memory_region_init_iommu(void *_iommu_mr,
  * If you pass a non-NULL non-device @owner then we will assert.
  */
 void memory_region_init_ram(MemoryRegion *mr,
-                            struct Object *owner,
+                            Object *owner,
                             const char *name,
                             uint64_t size,
                             Error **errp);
@@ -1210,7 +1210,7 @@  void memory_region_init_ram(MemoryRegion *mr,
  * @errp: pointer to Error*, to store an error if it happens.
  */
 void memory_region_init_rom(MemoryRegion *mr,
-                            struct Object *owner,
+                            Object *owner,
                             const char *name,
                             uint64_t size,
                             Error **errp);
@@ -1241,7 +1241,7 @@  void memory_region_init_rom(MemoryRegion *mr,
  * @errp: pointer to Error*, to store an error if it happens.
  */
 void memory_region_init_rom_device(MemoryRegion *mr,
-                                   struct Object *owner,
+                                   Object *owner,
                                    const MemoryRegionOps *ops,
                                    void *opaque,
                                    const char *name,
@@ -1254,7 +1254,7 @@  void memory_region_init_rom_device(MemoryRegion *mr,
  *
  * @mr: the memory region being queried.
  */
-struct Object *memory_region_owner(MemoryRegion *mr);
+Object *memory_region_owner(MemoryRegion *mr);
 
 /**
  * memory_region_size: get a memory region's size.
diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
index 8578f5a207d..2ff9f7a8d6f 100644
--- a/include/hw/ppc/pnv_xscom.h
+++ b/include/hw/ppc/pnv_xscom.h
@@ -139,7 +139,7 @@  int pnv_dt_xscom(PnvChip *chip, void *fdt, int root_offset,
 void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset,
                              MemoryRegion *mr);
 void pnv_xscom_region_init(MemoryRegion *mr,
-                           struct Object *owner,
+                           Object *owner,
                            const MemoryRegionOps *ops,
                            void *opaque,
                            const char *name,
diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
index e9ae1569ffc..be7018e8ac5 100644
--- a/hw/ppc/pnv_xscom.c
+++ b/hw/ppc/pnv_xscom.c
@@ -308,7 +308,7 @@  void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset, MemoryRegion *mr)
 }
 
 void pnv_xscom_region_init(MemoryRegion *mr,
-                           struct Object *owner,
+                           Object *owner,
                            const MemoryRegionOps *ops,
                            void *opaque,
                            const char *name,
diff --git a/softmmu/memory.c b/softmmu/memory.c
index 874a8fccdee..91f1bf47c30 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -1581,7 +1581,7 @@  void memory_region_init_resizeable_ram(MemoryRegion *mr,
 
 #ifdef CONFIG_POSIX
 void memory_region_init_ram_from_file(MemoryRegion *mr,
-                                      struct Object *owner,
+                                      Object *owner,
                                       const char *name,
                                       uint64_t size,
                                       uint64_t align,
@@ -1607,7 +1607,7 @@  void memory_region_init_ram_from_file(MemoryRegion *mr,
 }
 
 void memory_region_init_ram_from_fd(MemoryRegion *mr,
-                                    struct Object *owner,
+                                    Object *owner,
                                     const char *name,
                                     uint64_t size,
                                     bool share,
@@ -1679,7 +1679,7 @@  void memory_region_init_alias(MemoryRegion *mr,
 }
 
 void memory_region_init_rom_nomigrate(MemoryRegion *mr,
-                                      struct Object *owner,
+                                      Object *owner,
                                       const char *name,
                                       uint64_t size,
                                       Error **errp)
@@ -3205,7 +3205,7 @@  void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled)
 }
 
 void memory_region_init_ram(MemoryRegion *mr,
-                            struct Object *owner,
+                            Object *owner,
                             const char *name,
                             uint64_t size,
                             Error **errp)
@@ -3229,7 +3229,7 @@  void memory_region_init_ram(MemoryRegion *mr,
 }
 
 void memory_region_init_rom(MemoryRegion *mr,
-                            struct Object *owner,
+                            Object *owner,
                             const char *name,
                             uint64_t size,
                             Error **errp)
@@ -3253,7 +3253,7 @@  void memory_region_init_rom(MemoryRegion *mr,
 }
 
 void memory_region_init_rom_device(MemoryRegion *mr,
-                                   struct Object *owner,
+                                   Object *owner,
                                    const MemoryRegionOps *ops,
                                    void *opaque,
                                    const char *name,