From: Alex Williamson <alex.williamson@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Markus Armbruster <armbru@redhat.com>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
eric.auger@st.com, QEMU Developers <qemu-devel@nongnu.org>,
Eric Auger <eric.auger@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v2] hw/vfio/platform: replace g_malloc0_n by g_new0
Date: Thu, 11 Jun 2015 07:21:55 -0600 [thread overview]
Message-ID: <1434028915.4927.169.camel@redhat.com> (raw)
In-Reply-To: <CAFEAcA-9ndUfch1jRQWSqQty0fBA66wubeEyrZYcKrqkyQfXwg@mail.gmail.com>
On Thu, 2015-06-11 at 14:00 +0100, Peter Maydell wrote:
> On 11 June 2015 at 09:44, Eric Auger <eric.auger@linaro.org> wrote:
> > g_malloc0_n() is introduced since glib-2.24 while QEMU currently
> > requires glib-2.22. This may cause a link error on some distributions.
> >
> > Signed-off-by: Eric Auger <eric.auger@linaro.org>
> >
> > ---
> >
> > v1 -> v2:
> > - replace g_malloc0 by g_new0
> > ---
> > hw/vfio/platform.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
> > index 35266a8..9382bb7 100644
> > --- a/hw/vfio/platform.c
> > +++ b/hw/vfio/platform.c
> > @@ -346,8 +346,7 @@ static int vfio_populate_device(VFIODevice *vbasedev)
> > return ret;
> > }
> >
> > - vdev->regions = g_malloc0_n(vbasedev->num_regions,
> > - sizeof(VFIORegion *));
> > + vdev->regions = g_new0(VFIORegion *, vbasedev->num_regions);
> >
> > for (i = 0; i < vbasedev->num_regions; i++) {
> > struct vfio_region_info reg_info = { .argsz = sizeof(reg_info) };
> > --
> > 1.8.3.2
>
> This looks like the right fix to me -- if somebody would like to
> give it a reviewed-by tag I can apply it to master as a buildfix...
Thanks Peter
Acked-by: Alex Williamson <alex.williamson@redhat.com>
next prev parent reply other threads:[~2015-06-11 13:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 8:44 [Qemu-devel] [PATCH v2] hw/vfio/platform: replace g_malloc0_n by g_new0 Eric Auger
2015-06-11 13:00 ` Peter Maydell
2015-06-11 13:16 ` Gonglei
2015-06-11 13:21 ` Alex Williamson [this message]
2015-06-11 13:40 ` Peter Maydell
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=1434028915.4927.169.camel@redhat.com \
--to=alex.williamson@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=eric.auger@linaro.org \
--cc=eric.auger@st.com \
--cc=peter.maydell@linaro.org \
--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).