[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 039/126] hw/i386/x86: Reduce init_topo_info() scope
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 039/126] hw/i386/x86: Reduce init_topo_info() scope |
Date: |
Mon, 27 Feb 2023 15:00:46 +0100 |
This function is not used anywhere outside this file, so
we can delete the prototype from include/hw/i386/x86.h and
make the function "static void".
This fixes when building with -Wall and using Clang
("Apple clang version 14.0.0 (clang-1400.0.29.202)"):
../hw/i386/x86.c:70:24: error: static function 'MACHINE' is used in an inline
function with external linkage [-Werror,-Wstatic-in-inline]
MachineState *ms = MACHINE(x86ms);
^
include/hw/i386/x86.h:101:1: note: use 'static' to give inline function
'init_topo_info' internal linkage
void init_topo_info(X86CPUTopoInfo *topo_info, const X86MachineState *x86ms);
^
static
include/hw/boards.h:24:49: note: 'MACHINE' declared here
OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE)
^
Reported-by: Stefan Weil <sw@weilnetz.de>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20221216220158.6317-6-philmd@linaro.org>
---
hw/i386/x86.c | 2 +-
include/hw/i386/x86.h | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index 48be7a1c23..5f28dc8390 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -64,7 +64,7 @@
/* Physical Address of PVH entry point read from kernel ELF NOTE */
static size_t pvh_start_addr;
-inline void init_topo_info(X86CPUTopoInfo *topo_info,
+static void init_topo_info(X86CPUTopoInfo *topo_info,
const X86MachineState *x86ms)
{
MachineState *ms = MACHINE(x86ms);
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index 62fa5774f8..5d3047a1d1 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -20,7 +20,6 @@
#include "exec/hwaddr.h"
#include "qemu/notify.h"
-#include "hw/i386/topology.h"
#include "hw/boards.h"
#include "hw/nmi.h"
#include "hw/isa/isa.h"
@@ -98,8 +97,6 @@ struct X86MachineState {
#define TYPE_X86_MACHINE MACHINE_TYPE_NAME("x86")
OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass, X86_MACHINE)
-void init_topo_info(X86CPUTopoInfo *topo_info, const X86MachineState *x86ms);
-
uint32_t x86_cpu_apic_id_from_index(X86MachineState *pcms,
unsigned int cpu_index);
--
2.38.1
- [PULL 029/126] accel/kvm: Silent -Wmissing-field-initializers warning, (continued)
- [PULL 029/126] accel/kvm: Silent -Wmissing-field-initializers warning, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 028/126] accel/xen: Remove dead code, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 031/126] replay: Extract core API to 'exec/replay-core.h', Philippe Mathieu-Daudé, 2023/02/27
- [PULL 032/126] tests/unit: Restrict machine-smp.c test to system emulation, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 033/126] softmmu: Silent -Wmissing-field-initializers warning, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 035/126] qemu/typedefs: Sort in case-insensitive alphabetical order (again), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 034/126] softmmu: Extract watchpoint API from physmem.c, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 036/126] hw/nubus/nubus-device: Fix memory leak in nubus_device_realize, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 037/126] hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus(), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 038/126] hw/cpu: Extend CPUState::cluster_index documentation, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 039/126] hw/i386/x86: Reduce init_topo_info() scope,
Philippe Mathieu-Daudé <=
- [PULL 040/126] hw/i386/ich9: Rename Q35_MASK to ICH9_MASK, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 041/126] hw/isa/lpc_ich9: Unexport PIRQ functions, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 042/126] hw/isa/lpc_ich9: Eliminate ICH9LPCState::isa_bus, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 043/126] hw/i2c/smbus_ich9: Move ich9_smb_set_irq() in front of ich9_smbus_realize(), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 044/126] hw/i2c/smbus_ich9: Inline ich9_smb_init() and remove it, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 045/126] hw/i386/pc_q35: Allow for setting properties before realizing TYPE_ICH9_LPC_DEVICE, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 047/126] hw/isa/lpc_ich9: Remove redundant ich9_lpc_reset() invocation, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 046/126] hw/isa/lpc_ich9: Connect PM stuff to LPC internally, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 049/126] hw: Move ioapic*.h to intc/, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 048/126] hw/i386/ich9: Remove redundant GSI_NUM_PINS, Philippe Mathieu-Daudé, 2023/02/27