From: Eric Auger <eric.auger@linaro.org>
To: Gonglei <arei.gonglei@huawei.com>,
Alex Williamson <alex.williamson@redhat.com>,
qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PULL v2 1/3] hw/vfio/platform: vfio-platform skeleton
Date: Thu, 11 Jun 2015 08:50:40 +0200 [thread overview]
Message-ID: <55792FC0.5030907@linaro.org> (raw)
In-Reply-To: <5578F0AC.8060805@huawei.com>
Gonglei,
Thanks for the report and please apologize for the inconvenience. I am
going to send a fix reverting to simple g_malloc0 then.
Best Regards
Eric
On 06/11/2015 04:21 AM, Gonglei wrote:
> On 2015/6/9 23:55, Alex Williamson wrote:
>> +static int vfio_populate_device(VFIODevice *vbasedev)
>> +{
>> + int i, ret = -1;
>> + VFIOPlatformDevice *vdev =
>> + container_of(vbasedev, VFIOPlatformDevice, vbasedev);
>> +
>> + if (!(vbasedev->flags & VFIO_DEVICE_FLAGS_PLATFORM)) {
>> + error_report("vfio: Um, this isn't a platform device");
>> + return ret;
>> + }
>> +
>> + vdev->regions = g_malloc0_n(vbasedev->num_regions,
>> + sizeof(VFIORegion *));
>
> Failed to build on SUSE11.3:
>
> /home/qemu/hw/vfio/platform.c: In function ‘vfio_populate_device’:
> /home/qemu/hw/vfio/platform.c:349: warning: implicit declaration of function ‘g_malloc0_n’
> /home/qemu/hw/vfio/platform.c:349: warning: nested extern declaration of ‘g_malloc0_n’
> /home/qemu/hw/vfio/platform.c:350: warning: assignment makes pointer from integer without a cast
> CC x86_64-softmmu/hw/i386/pc_q35.o
> CC x86_64-softmmu/hw/i386/pc_sysfw.o
> CC x86_64-softmmu/hw/i386/acpi-build.o
> CC x86_64-softmmu/hw/i386/kvm/pci-assign.o
> CC x86_64-softmmu/target-i386/translate.o
> GEN trace/generated-helpers.c
> CC x86_64-softmmu/trace/generated-helpers.o
> LINK x86_64-softmmu/qemu-system-x86_64
> hw/vfio/platform.o: In function `vfio_populate_device':
> /home/qemu/hw/vfio/platform.c:349: undefined reference to `g_malloc0_n'
> collect2: ld returned 1 exit status
> make[1]: *** [qemu-system-x86_64] Error 1
> make: *** [subdir-x86_64-softmmu] Error 2
>
> That's because g_malloc0_n() introduced since glib-2.24,
> but QEMU just require glib-2.22.
>
> Regards,
> -Gonglei
>
next prev parent reply other threads:[~2015-06-11 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 15:55 [Qemu-devel] [PULL v2 0/3] Initial vfio-platform support Alex Williamson
2015-06-09 15:55 ` [Qemu-devel] [PULL v2 1/3] hw/vfio/platform: vfio-platform skeleton Alex Williamson
2015-06-11 2:21 ` Gonglei
2015-06-11 6:50 ` Eric Auger [this message]
2015-06-11 8:47 ` Peter Maydell
2015-06-09 15:55 ` [Qemu-devel] [PULL v2 2/3] hw/vfio/platform: add irq assignment Alex Williamson
2015-06-09 15:55 ` [Qemu-devel] [PULL v2 3/3] hw/vfio/platform: calxeda xgmac device Alex Williamson
2015-06-10 15:52 ` [Qemu-devel] [PULL v2 0/3] Initial vfio-platform support 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=55792FC0.5030907@linaro.org \
--to=eric.auger@linaro.org \
--cc=alex.williamson@redhat.com \
--cc=arei.gonglei@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.