On 16/04/2021 19.53, Philippe Mathieu-Daudé wrote:
Hi Thomas,

On 4/16/21 7:13 PM, Thomas Huth wrote:
Stop including hw/boards.h in files that don't need it.

Signed-off-by: Thomas Huth <th...@redhat.com>
---
  accel/tcg/tcg-accel-ops-icount.c | 1 -
  accel/tcg/tcg-accel-ops-rr.c     | 1 -
  accel/tcg/tcg-accel-ops.c        | 1 -
  hw/acpi/cpu.c                    | 1 -
  hw/acpi/memory_hotplug.c         | 1 -
  hw/alpha/typhoon.c               | 1 -
  hw/arm/aspeed.c                  | 1 -

It requires the macros declared by:

OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE)

"hw/boards.h" is already included in include/hw/arm/aspeed.h, that's why it's working ... Hmm, do we have a policy whether a header should be included again in the .c file if it's already included by a .h file?

  hw/arm/omap1.c                   | 1 -
  hw/arm/omap2.c                   | 1 -
  hw/arm/strongarm.c               | 1 -
  hw/arm/virt.c                    | 1 -

Ditto.

See include/hw/arm/virt.h

  hw/avr/arduino.c                 | 1 -

Ditto.

See hw/avr/boot.h

  hw/avr/atmega.c                  | 1 -
  hw/display/next-fb.c             | 1 -
  hw/hppa/machine.c                | 1 -

Ditto.

See hw/hppa/hppa_sys.h

  hw/i386/acpi-build.c             | 1 -
  hw/i386/acpi-microvm.c           | 1 -
  hw/i386/intel_iommu.c            | 1 -
  hw/i386/pc.c                     | 1 -

Ditto (MACHINE_CLASS macro).

See include/hw/i386/pc.h

  hw/i386/x86-iommu.c              | 1 -
  hw/intc/sifive_plic.c            | 1 -
  hw/mips/loongson3_virt.c         | 1 -

Ditto.

See hw/mips/fw_cfg.h

 Thomas


Reply via email to