diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2023-07-18 16:07:12 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-07-19 14:31:41 +1000 |
commit | a916dc954bb5d5aebe5bfcc222cbe9f984118442 (patch) | |
tree | 7e7a9159f97e0b0b04ad6f182a6443a35021f6d0 /hw/riscv/numa.c | |
parent | 55ea47397d07db2eb67cb7e86b4e7772098ece5f (diff) | |
download | qemu-a916dc954bb5d5aebe5bfcc222cbe9f984118442.zip qemu-a916dc954bb5d5aebe5bfcc222cbe9f984118442.tar.gz qemu-a916dc954bb5d5aebe5bfcc222cbe9f984118442.tar.bz2 |
hw/riscv: Fix typo field in error_report
"smp.cpus" means the number of online CPUs and "smp.max_cpus" means the
total number of CPUs.
riscv_numa_get_default_cpu_node_id() checks "smp.cpus" and the
"available CPUs" description in the next error message also indicates
online CPUs.
So report "smp.cpus" in error_report() instand of "smp.max_cpus".
Since "smp.cpus" is "unsigned int", use "%u".
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230718080712.503333-1-zhao1.liu@linux.intel.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/riscv/numa.c')
-rw-r--r-- | hw/riscv/numa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/riscv/numa.c b/hw/riscv/numa.c index e0414d5..d319aef 100644 --- a/hw/riscv/numa.c +++ b/hw/riscv/numa.c @@ -209,8 +209,8 @@ int64_t riscv_numa_get_default_cpu_node_id(const MachineState *ms, int idx) if (ms->numa_state->num_nodes > ms->smp.cpus) { error_report("Number of NUMA nodes (%d)" - " cannot exceed the number of available CPUs (%d).", - ms->numa_state->num_nodes, ms->smp.max_cpus); + " cannot exceed the number of available CPUs (%u).", + ms->numa_state->num_nodes, ms->smp.cpus); exit(EXIT_FAILURE); } if (ms->numa_state->num_nodes) { |