[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/9] hw/arm: Include missing 'exec/tswap.h' header
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 4/9] hw/arm: Include missing 'exec/tswap.h' header |
Date: |
Thu, 12 Dec 2024 00:03:52 +0100 |
Some files indirectly get "exec/tswap.h" declarations via
"exec/cpu-all.h". Include it directly to be able to remove
the former from the latter, otherwise we get:
hw/arm/boot.c:175:19: error: call to undeclared function 'tswap32'; ISO C99
and later do not support implicit function declarations
[-Wimplicit-function-declaration]
175 | code[i] = tswap32(insn);
| ^
hw/arm/npcm7xx.c:326:26: error: call to undeclared function 'tswap32'; ISO
C99 and later do not support implicit function declarations
[-Wimplicit-function-declaration]
326 | board_setup[i] = tswap32(board_setup[i]);
| ^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/arm/boot.c | 1 +
hw/arm/npcm7xx.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 5301d8d318c..30ba98d52fb 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -26,6 +26,7 @@
#include "qemu/config-file.h"
#include "qemu/option.h"
#include "qemu/units.h"
+#include "exec/tswap.h"
/* Kernel boot protocol is specified in the kernel docs
* Documentation/arm/Booting and Documentation/arm64/booting.txt
diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c
index af04c4b7ec4..3a5ef26f689 100644
--- a/hw/arm/npcm7xx.c
+++ b/hw/arm/npcm7xx.c
@@ -28,6 +28,7 @@
#include "qemu/units.h"
#include "sysemu/sysemu.h"
#include "target/arm/cpu-qom.h"
+#include "exec/tswap.h"
/*
* This covers the whole MMIO space. We'll use this to catch any MMIO accesses
--
2.45.2
- [PATCH v2 0/9] misc: Reduce 'exec/tswap.h' inclusions, Philippe Mathieu-Daudé, 2024/12/11
- [PATCH v2 1/9] target/xtensa: Remove tswap() calls in semihosting simcall() helper, Philippe Mathieu-Daudé, 2024/12/11
- [PATCH v2 2/9] target/mips: Remove tswap() calls in semihosting uhi_fstat_cb(), Philippe Mathieu-Daudé, 2024/12/11
- [PATCH v2 3/9] accel/tcg: Include missing 'exec/tswap.h' header in translator.c, Philippe Mathieu-Daudé, 2024/12/11
- [PATCH v2 4/9] hw/arm: Include missing 'exec/tswap.h' header,
Philippe Mathieu-Daudé <=
- [PATCH v2 5/9] hw/ppc: Include missing 'exec/tswap.h' header, Philippe Mathieu-Daudé, 2024/12/11
- [PATCH v2 6/9] hw/mips: Include missing 'exec/tswap.h' header, Philippe Mathieu-Daudé, 2024/12/11
- [PATCH v2 7/9] hw/sh4/r2d: Include missing 'exec/tswap.h' header, Philippe Mathieu-Daudé, 2024/12/11
- [PATCH v2 8/9] hw/xtensa: Include missing 'exec/tswap.h' header, Philippe Mathieu-Daudé, 2024/12/11