[PATCH 06/13] intc: remove PICCommonState from typedefs.h

Paolo Bonzini posted 13 patches 1 year, 9 months ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Dr. David Alan Gilbert" <dave@treblig.org>, Jason Wang <jasowang@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Markus Armbruster <armbru@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, David Hildenbrand <david@redhat.com>
[PATCH 06/13] intc: remove PICCommonState from typedefs.h
Posted by Paolo Bonzini 1 year, 9 months ago
Move it to the existing "PIC related things" header, hw/intc/i8259.h.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/hw/intc/i8259.h | 2 ++
 include/qemu/typedefs.h | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h
index c4125757753..1f2420231f1 100644
--- a/include/hw/intc/i8259.h
+++ b/include/hw/intc/i8259.h
@@ -3,6 +3,8 @@
 
 /* i8259.c */
 
+typedef struct PICCommonState PICCommonState;
+
 extern PICCommonState *isa_pic;
 
 /*
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 4519f0cd613..090e219248a 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -96,7 +96,6 @@ typedef struct PCIExpressDevice PCIExpressDevice;
 typedef struct PCIExpressHost PCIExpressHost;
 typedef struct PCIHostDeviceAddress PCIHostDeviceAddress;
 typedef struct PCIHostState PCIHostState;
-typedef struct PICCommonState PICCommonState;
 typedef struct PostcopyDiscardState PostcopyDiscardState;
 typedef struct Property Property;
 typedef struct PropertyInfo PropertyInfo;
-- 
2.44.0
Re: [PATCH 06/13] intc: remove PICCommonState from typedefs.h
Posted by Philippe Mathieu-Daudé 1 year, 9 months ago
On 2/5/24 17:53, Paolo Bonzini wrote:
> Move it to the existing "PIC related things" header, hw/intc/i8259.h.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   include/hw/intc/i8259.h | 2 ++
>   include/qemu/typedefs.h | 1 -
>   2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h
> index c4125757753..1f2420231f1 100644
> --- a/include/hw/intc/i8259.h
> +++ b/include/hw/intc/i8259.h
> @@ -3,6 +3,8 @@
>   
>   /* i8259.c */
>   
> +typedef struct PICCommonState PICCommonState;

I'd rather move from "hw/isa/i8259_internal.h" to here:

#define TYPE_PIC_COMMON "pic-common"
OBJECT_DECLARE_TYPE(PICCommonState, PICCommonClass, PIC_COMMON)

struct PICCommonState {
    ...
};

Can be done later, so meanwhile:

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>