Now than hpet_cfg[] is only accessed within hpet.c, make it static. No need to expose the hpet_fw_entry/hpet_fw_config structure declarations outside of it, so move them in the source too.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> --- include/hw/timer/hpet.h | 16 ---------------- hw/timer/hpet.c | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h index d361ab9e931..2a95799a679 100644 --- a/include/hw/timer/hpet.h +++ b/include/hw/timer/hpet.h @@ -60,22 +60,6 @@ #define HPET_TN_INT_ROUTE_CAP_SHIFT 32 #define HPET_TN_CFG_BITS_READONLY_OR_RESERVED 0xffff80b1U -struct hpet_fw_entry -{ - uint32_t event_timer_block_id; - uint64_t address; - uint16_t min_tick; - uint8_t page_prot; -} QEMU_PACKED; - -struct hpet_fw_config -{ - uint8_t count; - struct hpet_fw_entry hpet[8]; -} QEMU_PACKED; - -extern struct hpet_fw_config hpet_cfg; - #define TYPE_HPET "hpet" #define HPET_INTCAP "hpet-intcap" diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 9ca1424565f..849cb3e669b 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -41,6 +41,20 @@ #include "qom/object.h" #include "trace.h" +struct hpet_fw_entry +{ + uint32_t event_timer_block_id; + uint64_t address; + uint16_t min_tick; + uint8_t page_prot; +} QEMU_PACKED; + +struct hpet_fw_config +{ + uint8_t count; + struct hpet_fw_entry hpet[8]; +} QEMU_PACKED; + #define HPET_MSI_SUPPORT 0 OBJECT_DECLARE_SIMPLE_TYPE(HPETState, HPET) @@ -87,7 +101,7 @@ struct HPETState { uint8_t hpet_id; /* instance id */ }; -struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX}; +static struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX}; static uint32_t hpet_in_legacy_mode(HPETState *s) { -- 2.45.2