From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>, qemu-devel@nongnu.org
Cc: afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH qom v2 4/4] irq: Slim conversion of qemu_irq to QOM
Date: Wed, 18 Jun 2014 16:40:23 +0200 [thread overview]
Message-ID: <53A1A4D7.1040507@redhat.com> (raw)
In-Reply-To: <f1fbc450e5f6a13e7bf3df1baa608820407ea294.1403061437.git.peter.crosthwaite@xilinx.com>
Il 18/06/2014 09:57, Peter Crosthwaite ha scritto:
> @@ -63,7 +68,7 @@ qemu_irq qemu_allocate_irq(qemu_irq_handler handler, void *opaque, int n)
> {
> struct IRQState *irq;
>
> - irq = g_new(struct IRQState, 1);
> + irq = IRQ(object_new(TYPE_IRQ));
> irq->handler = handler;
> irq->opaque = opaque;
> irq->n = n;
> @@ -82,7 +87,7 @@ void qemu_free_irqs(qemu_irq *s, int n)
>
> void qemu_free_irq(qemu_irq irq)
> {
> - g_free(irq);
> + object_unref(OBJECT(irq));
> }
>
> static void qemu_notirq(void *opaque, int line, int level)
If the next step is to add an "owner" like the one in MemoryRegion, and
change occurrences of qemu_free_irq to object_unparent, then
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
next prev parent reply other threads:[~2014-06-18 14:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 7:53 [Qemu-devel] [PATCH qom v2 0/4] QOMify IRQs Peter Crosthwaite
2014-06-18 7:54 ` [Qemu-devel] [PATCH qom v2 1/4] sdhci: Fix misuse of qemu_free_irqs() Peter Crosthwaite
2014-06-27 9:39 ` Andreas Färber
2014-06-18 7:55 ` [Qemu-devel] [PATCH qom v2 2/4] hw: Fix qemu_allocate_irqs() leaks Peter Crosthwaite
2014-06-18 14:03 ` Kirill Batuzov
2014-06-27 9:45 ` Andreas Färber
2014-06-27 10:21 ` Peter Crosthwaite
2014-06-18 7:56 ` [Qemu-devel] [PATCH qom v2 3/4] irq: Allocate IRQs individually Peter Crosthwaite
2014-06-18 7:57 ` [Qemu-devel] [PATCH qom v2 4/4] irq: Slim conversion of qemu_irq to QOM Peter Crosthwaite
2014-06-18 14:40 ` Paolo Bonzini [this message]
2014-06-19 4:57 ` Peter Crosthwaite
2014-06-19 5:47 ` Paolo Bonzini
2014-06-25 9:39 ` [Qemu-devel] [PATCH qom v2 0/4] QOMify IRQs Peter Crosthwaite
2014-06-27 9:53 ` Andreas Färber
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=53A1A4D7.1040507@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
/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).