qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] vl.c: make find_default_machine() local


From: Wei Yang
Subject: Re: [Qemu-devel] [PATCH 1/2] vl.c: make find_default_machine() local
Date: Tue, 2 Apr 2019 15:07:10 +0000
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Apr 02, 2019 at 08:33:08AM +0200, Markus Armbruster wrote:
>Wei Yang <address@hidden> writes:
>
>> Function find_default_machine() is introduced by commit 2c8cffa599b7
>> "vl: make find_default_machine externally visible", while it seems no
>> one outside use it.
>It was used outside of vl.c until commit a904410af5f.
>
>> This patch make it local again.
>
>Suggest:
>
>  Commit a904410af5f removed the only user of find_default_machine()
>  outside vl.c, but neglected to make it static.  Do that now.
>

Markus

Thanks for your comments.

BTW, I think I need to spin a v2, right?

>> Signed-off-by: Wei Yang <address@hidden>
>> ---
>>  include/hw/boards.h | 1 -
>>  vl.c                | 4 ++--
>>  2 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/hw/boards.h b/include/hw/boards.h
>> index 21212f0859..e911d56c28 100644
>> --- a/include/hw/boards.h
>> +++ b/include/hw/boards.h
>> @@ -57,7 +57,6 @@ void memory_region_allocate_system_memory(MemoryRegion 
>> *mr, Object *owner,
>>  #define MACHINE_CLASS(klass) \
>>      OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE)
>>  
>> -MachineClass *find_default_machine(void);
>>  extern MachineState *current_machine;
>>  
>>  void machine_run_board_init(MachineState *machine);
>> diff --git a/vl.c b/vl.c
>> index 502857a176..3688e2bc98 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -1441,7 +1441,7 @@ static MachineClass *find_machine(const char *name)
>>      return mc;
>>  }
>>  
>> -MachineClass *find_default_machine(void)
>> +static MachineClass *find_default_machine(void)
>>  {
>>      GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false);
>>      MachineClass *mc = NULL;
>> @@ -2538,7 +2538,7 @@ static gint machine_class_cmp(gconstpointer a, 
>> gconstpointer b)
>>                    object_class_get_name(OBJECT_CLASS(mc1)));
>>  }
>>  
>> - static MachineClass *machine_parse(const char *name)
>> +static MachineClass *machine_parse(const char *name)
>>  {
>>      MachineClass *mc = NULL;
>>      GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false);
>
>Not related to this patch's stated purpose.  Should go into PATCH 2,
>where you're changing this line anyway.

-- 
Wei Yang
Help you, Help me



reply via email to

[Prev in Thread] Current Thread [Next in Thread]