Skip to contentSkip to conversation

spar: remove extra type variable

PATCH Superseded Cédric Le Goater 2 participants 3 messages Aug 9, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spar: remove extra type variable

The sPAPR CPU core typename is already available in the upper block.

---
 hw/ppc/spapr.c | 1 -
 1 file changed, 1 deletion(-)
hw/ppc/spapr.c +0 -1
index fdc6644d61cb..6dc5fe48971e 100644
@@ -1783,7 +1783,6 @@ static void ppc_spapr_init(MachineState *machine)
             qemu_register_reset(spapr_drc_reset, drc);
 
             if (i < spapr_cores) {
-                char *type = spapr_get_cpu_core_type(machine->cpu_model);
                 Object *core;
 
                 if (!object_class_by_name(type)) {
Signature · 1 line
2.7.4
#1 lore raw
Quoted 13 lines · Cédric Le Goater

The sPAPR CPU core typename is already available in the upper block.

---
 hw/ppc/spapr.c | 1 -
 1 file changed, 1 deletion(-)
hw/ppc/spapr.c +0 -0
index fdc6644d61cb..6dc5fe48971e 100644

hw/ppc/spapr.c static void ppc_spapr_init(MachineState *machine) · line 1788

Quoted 7 lines
hw/ppc/spapr.c +0 -1
@@ -1783,7 +1783,6 @@ static void ppc_spapr_init(MachineState *machine)
             qemu_register_reset(spapr_drc_reset, drc);
 
             if (i < spapr_cores) {
-                char *type = spapr_get_cpu_core_type(machine->cpu_model);
                 Object *core;
 
                 if (!object_class_by_name(type)) {

Good point. But I think the "if (!object_class_by_name(type))" check could then also be moved to the outer block instead.

Thomas

#2 lore raw
Quoted 16 lines · Thomas Huth
Quoted 15 lines · Cédric Le Goater

The sPAPR CPU core typename is already available in the upper block.

---
 hw/ppc/spapr.c | 1 -
 1 file changed, 1 deletion(-)
hw/ppc/spapr.c +0 -0
index fdc6644d61cb..6dc5fe48971e 100644
@@ -1783,7 +1783,6 @@ static void ppc_spapr_init(MachineState *machine)
             qemu_register_reset(spapr_drc_reset, drc);
 
Quoted 8 lines

hw/ppc/spapr.c static void ppc_spapr_init(MachineState *machine) · line 1788

Quoted 5 lines
hw/ppc/spapr.c +0 -1
             if (i < spapr_cores) {
-                char *type = spapr_get_cpu_core_type(machine->cpu_model);
                 Object *core;
 
                 if (!object_class_by_name(type)) {

Good point. But I think the "if (!object_class_by_name(type))" check could then also be moved to the outer block instead.

yes. I will rework that.

Thanks,

C.