[PATCH 0/2] bulk: Stop forward-declaring enum typedefs

Philippe Mathieu-Daudé posted 2 patches 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260130170417.43356-1-philmd@linaro.org
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, Markus Armbruster <armbru@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Alistair Francis <alistair@alistair23.me>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, Palmer Dabbelt <palmer@dabbelt.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Stefano Stabellini <sstabellini@kernel.org>, Anthony PERARD <anthony@xenproject.org>, Paul Durrant <paul@xen.org>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Jared Rossi <jrossi@linux.ibm.com>, Zhuoying Cai <zycai@linux.ibm.com>, Michael Roth <michael.roth@amd.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Eduardo Habkost <eduardo@habkost.net>
There is a newer version of this series
docs/devel/style.rst                 | 11 +++++++++++
hw/riscv/riscv-iommu-bits.h          |  4 ++--
hw/riscv/riscv-iommu.h               |  2 --
include/hw/misc/auxbus.h             | 11 ++++-------
include/hw/pci/pci_device.h          |  5 ++---
include/hw/ssi/ssi.h                 |  6 ++----
include/hw/xen/interface/io/xenbus.h |  5 ++---
include/io/channel.h                 | 11 ++++-------
include/system/replay.h              | 10 ++++------
include/ui/clipboard.h               | 15 ++++++---------
include/ui/kbd-state.h               |  6 ++----
pc-bios/s390-ccw/virtio.h            |  5 ++---
tests/qtest/libqos/qgraph_internal.h | 10 ++++------
hw/core/loader.c                     |  5 ++---
hw/display/xlnx_dp.c                 | 11 ++++-------
hw/dma/xlnx_dpdma.c                  | 10 ++++------
qapi/opts-visitor.c                  |  7 ++-----
qapi/string-output-visitor.c         |  6 ++----
tests/unit/check-qom-proplist.c      |  6 ++----
19 files changed, 61 insertions(+), 85 deletions(-)
[PATCH 0/2] bulk: Stop forward-declaring enum typedefs
Posted by Philippe Mathieu-Daudé 1 week ago
The C99 standard chapter §6.7.2.2 point 4 mentions:

  Each enumerated type shall be compatible with char, a signed
  integer type, or an unsigned integer type. The choice of type
  is implementation-defined, but shall be capable of representing
  the values of all the members of the enumeration.

Align with that recommendation by defining the typedef
along with the enum.

Philippe Mathieu-Daudé (2):
  bulk: Stop forward-declaring enum typedefs
  docs/devel: Mention enum typedefs forward-declaration is not allowed

 docs/devel/style.rst                 | 11 +++++++++++
 hw/riscv/riscv-iommu-bits.h          |  4 ++--
 hw/riscv/riscv-iommu.h               |  2 --
 include/hw/misc/auxbus.h             | 11 ++++-------
 include/hw/pci/pci_device.h          |  5 ++---
 include/hw/ssi/ssi.h                 |  6 ++----
 include/hw/xen/interface/io/xenbus.h |  5 ++---
 include/io/channel.h                 | 11 ++++-------
 include/system/replay.h              | 10 ++++------
 include/ui/clipboard.h               | 15 ++++++---------
 include/ui/kbd-state.h               |  6 ++----
 pc-bios/s390-ccw/virtio.h            |  5 ++---
 tests/qtest/libqos/qgraph_internal.h | 10 ++++------
 hw/core/loader.c                     |  5 ++---
 hw/display/xlnx_dp.c                 | 11 ++++-------
 hw/dma/xlnx_dpdma.c                  | 10 ++++------
 qapi/opts-visitor.c                  |  7 ++-----
 qapi/string-output-visitor.c         |  6 ++----
 tests/unit/check-qom-proplist.c      |  6 ++----
 19 files changed, 61 insertions(+), 85 deletions(-)

-- 
2.52.0