From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXX3R-0001os-Mf for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:04:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXX2j-0001ZT-0B for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:03:29 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:57356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXX2i-0001Tp-Qp for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:02:44 -0400 Received: by mail-wi0-f176.google.com with SMTP id n3so1221212wiv.3 for ; Fri, 26 Sep 2014 08:02:38 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5425800B.1080403@redhat.com> Date: Fri, 26 Sep 2014 17:02:35 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1409344310-5441-1-git-send-email-ehabkost@redhat.com> <1409344310-5441-8-git-send-email-ehabkost@redhat.com> In-Reply-To: <1409344310-5441-8-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 07/17] accel: Make AccelClass.available() optional List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Michael Mueller , "Michael S. Tsirkin" , Marcel Apfelbaum , Alexander Graf , Christian Borntraeger , "Jason J. Herne" , =?windows-1252?Q?Andreas_?= =?windows-1252?Q?F=E4rber?= Il 29/08/2014 22:31, Eduardo Habkost ha scritto: > When we move accel classes outside accel.c, the available() function > won't be necessary anymore, because the classes will be registered only > if the accelerator code is really enabled at build time. ... which alone is worth the whole series. :) > Signed-off-by: Eduardo Habkost > --- > hw/core/accel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/core/accel.c b/hw/core/accel.c > index 01cdbc3..483bbe8 100644 > --- a/hw/core/accel.c > +++ b/hw/core/accel.c > @@ -82,7 +82,7 @@ int configure_accelerator(MachineClass *mc) > fprintf(stderr, "\"%s\" accelerator does not exist.\n", buf); > continue; > } > - if (!acc->available()) { > + if (acc->available && !acc->available()) { > printf("%s not supported for this target\n", > acc->name); > continue; > Reviewed-by: Paolo Bonzini