qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Fei Li <lifei1214@126.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, shirley17fei@gmail.com
Subject: Re: [Qemu-devel] [PATCH] hw/misc/edu: add msi_uninit() for pci_edu_uninit()
Date: Mon, 14 Jan 2019 15:18:46 +0800	[thread overview]
Message-ID: <20190114071846.GF24343@xz-x1> (raw)
In-Reply-To: <87va2rwwlc.fsf@dusky.pond.sub.org>

On Mon, Jan 14, 2019 at 08:02:23AM +0100, Markus Armbruster wrote:
> Peter Xu <peterx@redhat.com> writes:
> 
> > On Sun, Jan 13, 2019 at 10:36:41PM +0800, Fei Li wrote:
> >> From: Fei Li <shirley17fei@gmail.com>
> >> 
> >> Let's supplement the msi_uninit() when failing to realize
> >> the pci edu device.
> >> 
> >> Cc: Markus Armbruster <armbru@redhat.com>
> >> Cc: Peter Xu <peterx@redhat.com>
> >> Cc: Michael S. Tsirkin <mst@redhat.com>
> >> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> >> Signed-off-by: Fei Li <shirley17fei@gmail.com>
> >> ---
> >>  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 <armbru@redhat.com>

Thanks,

-- 
Peter Xu

  reply	other threads:[~2019-01-14  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-13 14:36 [Qemu-devel] [PATCH] hw/misc/edu: add msi_uninit() for pci_edu_uninit() Fei Li
2019-01-13 16:54 ` Marcel Apfelbaum
2019-01-14  3:31 ` Peter Xu
2019-01-14  7:02   ` Markus Armbruster
2019-01-14  7:18     ` Peter Xu [this message]
2019-01-14 10:40       ` Philippe Mathieu-Daudé
2019-01-14 12:45         ` Fei Li

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=20190114071846.GF24343@xz-x1 \
    --to=peterx@redhat.com \
    --cc=armbru@redhat.com \
    --cc=lifei1214@126.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shirley17fei@gmail.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;
as well as URLs for NNTP newsgroup(s).