aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_rtas.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-01-21 12:03:42 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-24 20:59:11 +0100
commitdd32e94838e3ddc0895d4dc337e18b881741f4b7 (patch)
tree40156d8f54cf9d302558874ad4e3b74a39e274e7 /hw/ppc/spapr_rtas.c
parent500c2cc5d95f9da50da6aa845fa2ee1b99be4630 (diff)
downloadqemu-dd32e94838e3ddc0895d4dc337e18b881741f4b7.zip
qemu-dd32e94838e3ddc0895d4dc337e18b881741f4b7.tar.gz
qemu-dd32e94838e3ddc0895d4dc337e18b881741f4b7.tar.bz2
hw/ppc/spapr_rtas: Remove local variable
We only access this variable in the RTAS_SYSPARM_SPLPAR_CHARACTERISTICS case. Use it in place and remove the local declaration. Suggested-by: Greg Kurz <groug@kaod.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200121110349.25842-4-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/ppc/spapr_rtas.c')
-rw-r--r--hw/ppc/spapr_rtas.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 6f06e9d..85135e0 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -268,7 +268,6 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu,
{
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
MachineState *ms = MACHINE(spapr);
- unsigned int max_cpus = ms->smp.max_cpus;
target_ulong parameter = rtas_ld(args, 0);
target_ulong buffer = rtas_ld(args, 1);
target_ulong length = rtas_ld(args, 2);
@@ -280,10 +279,10 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu,
"DesMem=%" PRIu64 ","
"DesProcs=%d,"
"MaxPlatProcs=%d",
- max_cpus,
+ ms->smp.max_cpus,
ms->ram_size / MiB,
ms->smp.cpus,
- max_cpus);
+ ms->smp.max_cpus);
if (pcc->n_host_threads > 0) {
char *hostthr_val, *old = param_val;