All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] s390-pci: fix compilation on older GCC versions
@ 2017-01-27 13:20 Paolo Bonzini
  2017-01-27 13:40 ` Christian Borntraeger
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2017-01-27 13:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: cornelia.huck, borntraeger

S390PCIBusDevice is typedef'ed earlier in the file, before the hunks
that this patch modifies.  The double typedef causes old versions of
GCC to complain.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/s390x/s390-pci-bus.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/s390x/s390-pci-bus.h b/hw/s390x/s390-pci-bus.h
index b0adefa..a25e926 100644
--- a/hw/s390x/s390-pci-bus.h
+++ b/hw/s390x/s390-pci-bus.h
@@ -279,7 +279,7 @@ typedef struct S390PCIIOMMUTable {
     S390PCIIOMMU *iommu[PCI_SLOT_MAX];
 } S390PCIIOMMUTable;
 
-typedef struct S390PCIBusDevice {
+struct S390PCIBusDevice {
     DeviceState qdev;
     PCIDevice *pdev;
     ZpciState state;
@@ -301,7 +301,7 @@ typedef struct S390PCIBusDevice {
     IndAddr *indicator;
     QEMUTimer *release_timer;
     QTAILQ_ENTRY(S390PCIBusDevice) link;
-} S390PCIBusDevice;
+};
 
 typedef struct S390PCIBus {
     BusState qbus;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] s390-pci: fix compilation on older GCC versions
  2017-01-27 13:20 [Qemu-devel] [PATCH] s390-pci: fix compilation on older GCC versions Paolo Bonzini
@ 2017-01-27 13:40 ` Christian Borntraeger
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Borntraeger @ 2017-01-27 13:40 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: cornelia.huck

On 01/27/2017 02:20 PM, Paolo Bonzini wrote:
> S390PCIBusDevice is typedef'ed earlier in the file, before the hunks
> that this patch modifies.  The double typedef causes old versions of
> GCC to complain.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/s390x/s390-pci-bus.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/s390x/s390-pci-bus.h b/hw/s390x/s390-pci-bus.h
> index b0adefa..a25e926 100644
> --- a/hw/s390x/s390-pci-bus.h
> +++ b/hw/s390x/s390-pci-bus.h
> @@ -279,7 +279,7 @@ typedef struct S390PCIIOMMUTable {
>      S390PCIIOMMU *iommu[PCI_SLOT_MAX];
>  } S390PCIIOMMUTable;
> 
> -typedef struct S390PCIBusDevice {
> +struct S390PCIBusDevice {
>      DeviceState qdev;
>      PCIDevice *pdev;
>      ZpciState state;
> @@ -301,7 +301,7 @@ typedef struct S390PCIBusDevice {
>      IndAddr *indicator;
>      QEMUTimer *release_timer;
>      QTAILQ_ENTRY(S390PCIBusDevice) link;
> -} S390PCIBusDevice;
> +};
> 
>  typedef struct S390PCIBus {
>      BusState qbus;
> 
We cannot move this before S390PCIIOMMUTable due to the cross
dependency and we need a forward declaration of the typedef, so
yet this makes sense.

applied to our tree.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-27 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 13:20 [Qemu-devel] [PATCH] s390-pci: fix compilation on older GCC versions Paolo Bonzini
2017-01-27 13:40 ` Christian Borntraeger

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.