qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/misc/edu: add msi_uninit() for pci_edu_unini


From: Fei Li
Subject: Re: [Qemu-devel] [PATCH] hw/misc/edu: add msi_uninit() for pci_edu_uninit()
Date: Mon, 14 Jan 2019 20:45:02 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0


在 2019/1/14 下午6:40, Philippe Mathieu-Daudé 写道:
On 1/14/19 8:18 AM, Peter Xu wrote:
On Mon, Jan 14, 2019 at 08:02:23AM +0100, Markus Armbruster wrote:
Peter Xu <address@hidden> writes:

On Sun, Jan 13, 2019 at 10:36:41PM +0800, Fei Li wrote:
From: Fei Li <address@hidden>

Let's supplement the msi_uninit() when failing to realize
the pci edu device.

Cc: Markus Armbruster <address@hidden>
Cc: Peter Xu <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Signed-off-by: Fei Li <address@hidden>
---
  hw/misc/edu.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index cdcf550dd7..4feb7503de 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -367,6 +367,7 @@ static void pci_edu_uninit(PCIDevice *pdev)
  {
      EduState *edu = EDU(pdev);
+ msi_uninit(pdev);
It would be cleaner to me to call this after the join() since
edu_fact_thread() could potentially use msi_*() helpers then the
destructions follow the reverse order of init.
Destruction in reverse creation order is good practice.

This being the "QEMU educational PCI device", good practice is even more
desirable.
Very persuasive.  With that, I'd like to withdraw my excuse of
"msi_uninit() is optional" too. :)

Fei, please feel free to pick my r-b if you want to repost, and IMHO
you can also add:

Reported-by: Markus Armbruster <address@hidden>

Thanks,

Moving msi_uninit() after timer_del():
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

Ok, thanks all!

Will do the update and send a new version soon.

Have a nice day
Fei




reply via email to

[Prev in Thread] Current Thread [Next in Thread]