qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spar: remove extra type variable
@ 2016-08-09  8:25 Cédric Le Goater
  2016-08-09 11:05 ` Thomas Huth
  0 siblings, 1 reply; 3+ messages in thread
From: Cédric Le Goater @ 2016-08-09  8:25 UTC (permalink / raw)
  To: qemu-ppc; +Cc: David Gibson, Bharata B Rao, qemu-devel, Cédric Le Goater

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

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/ppc/spapr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index fdc6644d61cb..6dc5fe48971e 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -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)) {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] spar: remove extra type variable
  2016-08-09  8:25 [Qemu-devel] [PATCH] spar: remove extra type variable Cédric Le Goater
@ 2016-08-09 11:05 ` Thomas Huth
  2016-08-09 11:07   ` Cédric Le Goater
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2016-08-09 11:05 UTC (permalink / raw)
  To: Cédric Le Goater, qemu-ppc; +Cc: Bharata B Rao, qemu-devel, David Gibson

On 09.08.2016 10:25, Cédric Le Goater wrote:
> The sPAPR CPU core typename is already available in the upper
> block.
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>  hw/ppc/spapr.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index fdc6644d61cb..6dc5fe48971e 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] spar: remove extra type variable
  2016-08-09 11:05 ` Thomas Huth
@ 2016-08-09 11:07   ` Cédric Le Goater
  0 siblings, 0 replies; 3+ messages in thread
From: Cédric Le Goater @ 2016-08-09 11:07 UTC (permalink / raw)
  To: Thomas Huth, qemu-ppc; +Cc: Bharata B Rao, qemu-devel, David Gibson

On 08/09/2016 01:05 PM, Thomas Huth wrote:
> On 09.08.2016 10:25, Cédric Le Goater wrote:
>> The sPAPR CPU core typename is already available in the upper
>> block.
>>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>> ---
>>  hw/ppc/spapr.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
>> index fdc6644d61cb..6dc5fe48971e 100644
>> --- a/hw/ppc/spapr.c
>> +++ b/hw/ppc/spapr.c
>> @@ -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.

yes. I will rework that. 

Thanks,

C.
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-09 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09  8:25 [Qemu-devel] [PATCH] spar: remove extra type variable Cédric Le Goater
2016-08-09 11:05 ` Thomas Huth
2016-08-09 11:07   ` Cédric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).