On Tue, Apr 02, 2019 at 08:33:08AM +0200, Markus Armbruster wrote: >Wei Yang <richardw.y...@linux.intel.com> 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 <richardw.y...@linux.intel.com> >> --- >> 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