From: Avi Kivity <avi@redhat.com>
To: "Han, Weidong" <weidong.han@intel.com>
Cc: "'Gerd Hoffmann'" <kraxel@redhat.com>,
"'Paul Brook'" <paul@codesourcery.com>,
"'kvm@vger.kernel.org'" <kvm@vger.kernel.org>
Subject: Re: [PATCH RFC] qemu: fix hot remove assigned device
Date: Wed, 10 Jun 2009 11:06:21 +0300 [thread overview]
Message-ID: <4A2F697D.8070405@redhat.com> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C054596A9FF@pdsmsx503.ccr.corp.intel.com>
Han, Weidong wrote:
>
> -int pci_unregister_device(PCIDevice *pci_dev)
> +int pci_unregister_device(PCIDevice *pci_dev, int assigned)
> {
> int ret = 0;
>
> @@ -377,7 +377,11 @@ int pci_unregister_device(PCIDevice *pci_dev)
> qemu_free_irqs(pci_dev->irq);
> pci_irq_index--;
> pci_dev->bus->devices[pci_dev->devfn] = NULL;
> - qdev_free(&pci_dev->qdev);
> +
> + if (assigned)
> + qemu_free(pci_dev);
> + else
> + qdev_free(&pci_dev->qdev);
> return 0;
> }
>
Can you check pci_dev->qdev instead of assigned? A little less ugly.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-06-10 8:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 17:17 [PATCH RFC] qemu: fix hot remove assigned device Weidong Han
2009-06-08 14:38 ` Paul Brook
2009-06-09 2:45 ` Han, Weidong
2009-06-09 14:51 ` Paul Brook
2009-06-09 15:37 ` Gerd Hoffmann
2009-06-10 7:45 ` Han, Weidong
2009-06-10 8:06 ` Avi Kivity [this message]
2009-06-10 8:31 ` Han, Weidong
2009-06-10 8:42 ` Avi Kivity
2009-06-10 8:49 ` Gerd Hoffmann
2009-06-10 8:55 ` Han, Weidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A2F697D.8070405@redhat.com \
--to=avi@redhat.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=paul@codesourcery.com \
--cc=weidong.han@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox