The point of this cleanup series is to avoid a circular dependency
problem between "qemu/bswap.h" and "exec/memop.h", since I want
to add a ld/st variant in "qemu/bswap.h" that takes a MemOp arg.

Otherwise I get:

    In file included from ../../util/qemu-timer-common.c:25:
    In file included from include/qemu/timer.h:4:
    In file included from include/qemu/bitops.h:16:
    In file included from include/qemu/host-utils.h:33:
    In file included from include/qemu/bswap.h:6:
    include/exec/memop.h:182:19: error: call to undeclared function 'ctz32'; 
ISO C99 and later do not support implicit function declarations 
[-Wimplicit-function-declaration]
      182 |     return (MemOp)ctz32(size);
          |                   ^
    In file included from ../../util/qemu-timer-common.c:25:
    In file included from include/qemu/timer.h:4:
    In file included from include/qemu/bitops.h:16:
    include/qemu/host-utils.h:236:19: error: static declaration of 'ctz32' 
follows non-static declaration
      236 | static inline int ctz32(uint32_t val)
          |                   ^
    include/exec/memop.h:182:19: note: previous implicit declaration is here
      182 |     return (MemOp)ctz32(size);
          |                   ^
    2 errors generated.

Philippe Mathieu-Daudé (3):
  bswap: Use 'qemu/bswap.h' instead of 'qemu/host-utils.h'
  bswap: Include missing 'qemu/bswap.h' header
  bswap: Consistently use builtin bswap() functions

 block/qcow2.h                         | 1 +
 include/qemu/host-utils.h             | 7 +++----
 include/qemu/int128.h                 | 7 +++----
 audio/audio.c                         | 1 +
 block/blklogwrites.c                  | 1 +
 block/export/vduse-blk.c              | 1 +
 block/export/vhost-user-blk-server.c  | 1 +
 block/export/virtio-blk-handler.c     | 1 +
 block/parallels-ext.c                 | 1 +
 hw/9pfs/9p-local.c                    | 1 +
 hw/block/cdrom.c                      | 1 +
 hw/block/hd-geometry.c                | 1 +
 hw/net/can/ctucan_core.c              | 1 +
 hw/nvram/xlnx-efuse.c                 | 1 +
 hw/scsi/scsi-generic.c                | 1 +
 hw/sd/sd.c                            | 1 +
 hw/sd/ssi-sd.c                        | 1 +
 net/l2tpv3.c                          | 1 +
 scsi/pr-manager-helper.c              | 1 +
 target/arm/tcg/arith_helper.c         | 1 +
 tests/qtest/acpi-utils.c              | 1 +
 tests/qtest/ahci-test.c               | 2 +-
 tests/qtest/aspeed-hace-utils.c       | 1 +
 tests/qtest/bios-tables-test.c        | 1 +
 tests/qtest/libqos/ahci.c             | 2 +-
 tests/qtest/libqos/generic-pcihost.c  | 2 +-
 tests/qtest/libqos/igb.c              | 1 +
 tests/qtest/libqos/pci-spapr.c        | 2 +-
 tests/qtest/libqos/virtio-9p-client.c | 1 +
 tests/qtest/migration/framework.c     | 1 +
 tests/qtest/npcm7xx_emc-test.c        | 1 +
 tests/qtest/tpm-emu.c                 | 1 +
 tests/qtest/ufs-test.c                | 1 +
 tests/qtest/vmcoreinfo-test.c         | 1 +
 tests/qtest/vmgenid-test.c            | 1 +
 tests/unit/test-hbitmap.c             | 1 +
 util/bitmap.c                         | 1 +
 util/hbitmap.c                        | 2 +-
 38 files changed, 42 insertions(+), 13 deletions(-)

-- 
2.52.0


Reply via email to