Received: from eggs.gnu.org ([2001:4830:134:3::10]:44521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRlAC-0001UL-7E for qemu-devel@nongnu.org; Sun, 23 Mar 2014 12:22:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRl9z-0006wO-6Y for qemu-devel@nongnu.org; Sun, 23 Mar 2014 12:22:20 -0400 Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]:60763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRl9y-0006wK-VE for qemu-devel@nongnu.org; Sun, 23 Mar 2014 12:22:07 -0400 Received: by mail-ee0-f49.google.com with SMTP id c41so3575152eek.8 for ; Sun, 23 Mar 2014 09:21:50 -0700 (PDT) Message-ID: <1395591730.5673.60.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Sun, 23 Mar 2014 18:22:10 +0200 In-Reply-To: <1395588465.5673.57.camel@localhost.localdomain> References: <1395327676-29753-1-git-send-email-imammedo@redhat.com> <1395327676-29753-3-git-send-email-imammedo@redhat.com> <1395588465.5673.57.camel@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 2/8] make machine_class_init() accessible outside of vl.c Reply-To: marcel.a@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: mst@redhat.com, qemu-devel@nongnu.org, vasilis.liaskovitis@profitbricks.com, aliguori@amazon.com, pbonzini@redhat.com, afaerber@suse.de On Sun, 2014-03-23 at 17:27 +0200, Marcel Apfelbaum wrote: > On Thu, 2014-03-20 at 16:01 +0100, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > hw/core/machine.c | 7 +++++++ > > include/hw/boards.h | 2 ++ > > vl.c | 7 ------- > > 3 files changed, 9 insertions(+), 7 deletions(-) > > > > diff --git a/hw/core/machine.c b/hw/core/machine.c > > index d3ffef7..ae308f4 100644 > > --- a/hw/core/machine.c > > +++ b/hw/core/machine.c > > @@ -12,6 +12,13 @@ > > > > #include "hw/boards.h" > > > > +void machine_class_init(ObjectClass *oc, void *data) > As I said in 3/8 review, if we *need* to move the above method, > I would hide it in hw/core/machine.c. Just to make it more clear, I was talking about not making it visible in "hw/boards.h", because you *did* move it to hw/core/machine.c :) Thanks, Marcel > > Please have a look on 3/8 review for details. > Thanks, > Marcel > > > +{ > > + MachineClass *mc = MACHINE_CLASS(oc); > > + > > + mc->qemu_machine = data; > > +} > > + > > static const TypeInfo machine_info = { > > .name = TYPE_MACHINE, > > .parent = TYPE_OBJECT, > > diff --git a/include/hw/boards.h b/include/hw/boards.h > > index 22d9496..e1f1938 100644 > > --- a/include/hw/boards.h > > +++ b/include/hw/boards.h > > @@ -81,6 +81,8 @@ struct MachineClass { > > QEMUMachine *qemu_machine; > > }; > > > > +void machine_class_init(ObjectClass *oc, void *data); > > + > > /** > > * MachineState: > > */ > > diff --git a/vl.c b/vl.c > > index 7bae6fe..05b1158 100644 > > --- a/vl.c > > +++ b/vl.c > > @@ -1588,13 +1588,6 @@ void pcmcia_info(Monitor *mon, const QDict *qdict) > > > > MachineState *current_machine; > > > > -static void machine_class_init(ObjectClass *oc, void *data) > > -{ > > - MachineClass *mc = MACHINE_CLASS(oc); > > - > > - mc->qemu_machine = data; > > -} > > - > > int qemu_register_machine(QEMUMachine *m) > > { > > TypeInfo ti = { > > > >