From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfunw-0004CO-SU for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:53:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tfunq-0006xb-TE for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:53:04 -0500 Received: from greensocs.com ([87.106.252.221]:54297 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfunq-0006xS-MM for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:52:58 -0500 Message-ID: <50BE1C4F.3050101@greensocs.com> Date: Tue, 04 Dec 2012 16:52:47 +0100 From: =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= MIME-Version: 1.0 References: <1354631742-4693-1-git-send-email-fred.konrad@greensocs.com> <1354631742-4693-5-git-send-email-fred.konrad@greensocs.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v5 4/6] virtio-pci : Refactor virtio-pci device. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: aliguori@us.ibm.com, e.voevodin@samsung.com, mark.burton@greensocs.com, qemu-devel@nongnu.org, stefanha@redhat.com, cornelia.huck@de.ibm.com, afaerber@suse.de On 04/12/2012 15:49, Peter Maydell wrote: > On 4 December 2012 14:35, wrote: >> From: KONRAD Frederic >> >> Create the virtio-pci device. This transport device will create a >> virtio-pci-bus, so one VirtIODevice can be connected. >> >> Signed-off-by: KONRAD Frederic >> --- >> hw/virtio-pci.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> hw/virtio-pci.h | 14 +++++++ >> 2 files changed, 126 insertions(+) >> >> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c >> index 5ac8d0d..8426122 100644 >> --- a/hw/virtio-pci.c >> +++ b/hw/virtio-pci.c >> @@ -1119,6 +1119,115 @@ static TypeInfo virtio_scsi_info = { >> .class_init = virtio_scsi_class_init, >> }; >> >> +/* >> + * virtio-pci : This is the PCIDevice which have a virtio-pci-bus. >> + */ >> + >> +/* init callback */ >> +static void virtio_pci_init_cb(void *opaque) >> +/* exit callback */ >> +static void virtio_pci_exit_cb(void *opaque) >> +static int virtio_pci_init(PCIDevice *pci_dev) >> +static void virtio_pci_exit(PCIDevice *pci_dev) > It's rather confusing to have an init and an init_cb and also > an exit and an exit_cb, and not to have anything explaining > what the difference is or when each one is called or what > needs to be done in one that can't be done in the other. Right, I'll change the name and add comments. > > -- PMM >