From patchwork Fri Jan 25 13:12:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 215681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F208A2C0085 for ; Sat, 26 Jan 2013 00:41:47 +1100 (EST) Received: from localhost ([::1]:41786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyj6L-0008QK-Gy for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2013 08:13:49 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyj5Z-0007CE-1b for qemu-devel@nongnu.org; Fri, 25 Jan 2013 08:13:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tyj5Q-000279-HE for qemu-devel@nongnu.org; Fri, 25 Jan 2013 08:13:00 -0500 Received: from mail-qe0-f51.google.com ([209.85.128.51]:44365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tyj5Q-00026q-D3 for qemu-devel@nongnu.org; Fri, 25 Jan 2013 08:12:52 -0500 Received: by mail-qe0-f51.google.com with SMTP id 6so87286qea.38 for ; Fri, 25 Jan 2013 05:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=ljwDhpoIeiziEfyFXInO7ZPQCdCr7agIdiF/mO8SgbA=; b=oc/msEwoZesAXCBFFVnCLGb4N/b4drVGkenAtz5iN2W4bv3ag9QEjYynlE80V6adXK qYY2kh4N+8SFsB2OFhGfRBl7//MX1ku+cIC6PzY2MoNGdv2lOkcAhjIGtn+GE/QCwm5G q8Jm9ayeo0WQLvP49tnTPcTa1Yx2O+n4hVGOSD6WndqobGHe/Xvy+Y/PM283y+e7UiUU IA7YmG+x7ReIhkXdgxvYkuF7ZbsaD7FTGI6jA1WCIbx9iG2zTBmAo4fF5uGgj5v4XU9h 4aLHL2AdFZ0EenSeZPS6TpBqJrWPQSSkXcbQd709fGDWVhuES0QyEgd6uZnERsUWWbwY XJQg== X-Received: by 10.224.86.136 with SMTP id s8mr5843352qal.72.1359119571788; Fri, 25 Jan 2013 05:12:51 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-179-137.ip50.fastwebnet.it. [93.34.179.137]) by mx.google.com with ESMTPS id u8sm416277qeu.2.2013.01.25.05.12.50 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Jan 2013 05:12:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2013 14:12:28 +0100 Message-Id: <1359119559-19075-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1359119559-19075-1-git-send-email-pbonzini@redhat.com> References: <1359119559-19075-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.128.51 Cc: afaerber@suse.de Subject: [Qemu-devel] [PATCH v4 02/13] qdev: change first argument of qbus_create_inplace to void * X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Make it clear that no BUS() macro is needed in the callers (in fact it wouldn't work because the object has not been initialized yet with the right class). Suggested-by: Andreas Faerber Signed-off-by: Paolo Bonzini Acked-by: Andreas Färber --- hw/qdev-core.h | 2 +- hw/qdev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-core.h b/hw/qdev-core.h index d1b8e37..2486f36 100644 --- a/hw/qdev-core.h +++ b/hw/qdev-core.h @@ -231,7 +231,7 @@ DeviceState *qdev_find_recursive(BusState *bus, const char *id); typedef int (qbus_walkerfn)(BusState *bus, void *opaque); typedef int (qdev_walkerfn)(DeviceState *dev, void *opaque); -void qbus_create_inplace(BusState *bus, const char *typename, +void qbus_create_inplace(void *bus, const char *typename, DeviceState *parent, const char *name); BusState *qbus_create(const char *typename, DeviceState *parent, const char *name); /* Returns > 0 if either devfn or busfn skip walk somewhere in cursion, diff --git a/hw/qdev.c b/hw/qdev.c index 59dce62..b80b082 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -428,7 +428,7 @@ static void qbus_realize(BusState *bus, DeviceState *parent, const char *name) } } -void qbus_create_inplace(BusState *bus, const char *typename, +void qbus_create_inplace(void *bus, const char *typename, DeviceState *parent, const char *name) { object_initialize(bus, typename);