|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH 12/13] pci: move unregister from PCIDevice to PCIDeviceInfo |
Date: | Fri, 25 Sep 2009 09:49:16 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 |
Hi,
static int pci_unregister_device(DeviceState *dev)
+ msix_uninit(pci_dev);
Since devices call msix_add, I think it is cleaner to have them uninit it as well in their exit routines.
Would work too. But this way you can't miss the msix_uninit() call by accident. It also saves a few lines of code. msix_uninit() carefully checks whenever msix is actually enabled and it is slow path, so calling it on non-msix devices isn't a big deal IMHO.
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |