qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Xu <peterx@redhat.com>, Markus Armbruster <armbru@redhat.com>
Cc: Fei Li <lifei1214@126.com>,
	shirley17fei@gmail.com, qemu-devel@nongnu.org,
	"Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/misc/edu: add msi_uninit() for pci_edu_uninit()
Date: Mon, 14 Jan 2019 11:40:30 +0100	[thread overview]
Message-ID: <64212cc6-47aa-78ae-20cb-d75c5fade03a@redhat.com> (raw)
In-Reply-To: <20190114071846.GF24343@xz-x1>

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 <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,
> 

Moving msi_uninit() after timer_del():
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

  reply	other threads:[~2019-01-14 10:40 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
2019-01-14 10:40       ` Philippe Mathieu-Daudé [this message]
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=64212cc6-47aa-78ae-20cb-d75c5fade03a@redhat.com \
    --to=philmd@redhat.com \
    --cc=armbru@redhat.com \
    --cc=lifei1214@126.com \
    --cc=mst@redhat.com \
    --cc=peterx@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).