* [Qemu-devel] [PULL 0/1] VFIO - fix glib 2.22 compat
@ 2015-09-25 17:06 Alex Williamson
2015-09-25 17:07 ` [Qemu-devel] [PULL 1/1] vfio/pci: Remove use of g_malloc0_n() from quirks Alex Williamson
2015-09-25 20:52 ` [Qemu-devel] [PULL 0/1] VFIO - fix glib 2.22 compat Peter Maydell
0 siblings, 2 replies; 4+ messages in thread
From: Alex Williamson @ 2015-09-25 17:06 UTC (permalink / raw)
To: qemu-devel
Hi Peter,
I'll likely have another pull next week, but I don't want to sit on
this trivial fix for glib 2.22 compatability. Thanks,
Alex
The following changes since commit fefa4b128de06cec6d513f00ee61e8208aed4a87:
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20150923.0' into staging (2015-09-23 21:39:46 +0100)
are available in the git repository at:
git://github.com/awilliam/qemu-vfio.git tags/vfio-update-20150925.0
for you to fetch changes up to 9d146b2e2fbc1c2e42be1e3ee6c0d507ea79f0f9:
vfio/pci: Remove use of g_malloc0_n() from quirks (2015-09-23 21:27:17 -0600)
----------------------------------------------------------------
VFIO updates 2015-09-25
- Remove use of g_malloc0_n for glib2.22 compat
----------------------------------------------------------------
Alex Williamson (1):
vfio/pci: Remove use of g_malloc0_n() from quirks
hw/vfio/pci-quirks.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/1] vfio/pci: Remove use of g_malloc0_n() from quirks
2015-09-25 17:06 [Qemu-devel] [PULL 0/1] VFIO - fix glib 2.22 compat Alex Williamson
@ 2015-09-25 17:07 ` Alex Williamson
2015-09-28 6:53 ` Markus Armbruster
2015-09-25 20:52 ` [Qemu-devel] [PULL 0/1] VFIO - fix glib 2.22 compat Peter Maydell
1 sibling, 1 reply; 4+ messages in thread
From: Alex Williamson @ 2015-09-25 17:07 UTC (permalink / raw)
To: qemu-devel
For compatibility with glib 2.22.
Reported-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/vfio/pci-quirks.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
index 2bdaef1..c675d1b 100644
--- a/hw/vfio/pci-quirks.c
+++ b/hw/vfio/pci-quirks.c
@@ -284,7 +284,7 @@ static void vfio_vga_probe_ati_3c3_quirk(VFIOPCIDevice *vdev)
}
quirk = g_malloc0(sizeof(*quirk));
- quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 1);
+ quirk->mem = g_malloc0(sizeof(MemoryRegion));
quirk->nr_mem = 1;
memory_region_init_io(quirk->mem, OBJECT(vdev), &vfio_ati_3c3_quirk, vdev,
@@ -319,7 +319,7 @@ static void vfio_probe_ati_bar4_quirk(VFIOPCIDevice *vdev, int nr)
}
quirk = g_malloc0(sizeof(*quirk));
- quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 2);
+ quirk->mem = g_malloc0(sizeof(MemoryRegion) * 2);
quirk->nr_mem = 2;
window = quirk->data = g_malloc0(sizeof(*window) +
sizeof(VFIOConfigWindowMatch));
@@ -368,7 +368,7 @@ static void vfio_probe_ati_bar2_quirk(VFIOPCIDevice *vdev, int nr)
quirk = g_malloc0(sizeof(*quirk));
mirror = quirk->data = g_malloc0(sizeof(*mirror));
- mirror->mem = quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 1);
+ mirror->mem = quirk->mem = g_malloc0(sizeof(MemoryRegion));
quirk->nr_mem = 1;
mirror->vdev = vdev;
mirror->offset = 0x4000;
@@ -544,7 +544,7 @@ static void vfio_vga_probe_nvidia_3d0_quirk(VFIOPCIDevice *vdev)
quirk = g_malloc0(sizeof(*quirk));
quirk->data = data = g_malloc0(sizeof(*data));
- quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 2);
+ quirk->mem = g_malloc0(sizeof(MemoryRegion) * 2);
quirk->nr_mem = 2;
data->vdev = vdev;
@@ -661,7 +661,7 @@ static void vfio_probe_nvidia_bar5_quirk(VFIOPCIDevice *vdev, int nr)
}
quirk = g_malloc0(sizeof(*quirk));
- quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 4);
+ quirk->mem = g_malloc0(sizeof(MemoryRegion) * 4);
quirk->nr_mem = 4;
bar5 = quirk->data = g_malloc0(sizeof(*bar5) +
(sizeof(VFIOConfigWindowMatch) * 2));
@@ -756,7 +756,7 @@ static void vfio_probe_nvidia_bar0_quirk(VFIOPCIDevice *vdev, int nr)
quirk = g_malloc0(sizeof(*quirk));
mirror = quirk->data = g_malloc0(sizeof(*mirror));
- mirror->mem = quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 1);
+ mirror->mem = quirk->mem = g_malloc0(sizeof(MemoryRegion));
quirk->nr_mem = 1;
mirror->vdev = vdev;
mirror->offset = 0x88000;
@@ -775,7 +775,7 @@ static void vfio_probe_nvidia_bar0_quirk(VFIOPCIDevice *vdev, int nr)
if (vdev->has_vga) {
quirk = g_malloc0(sizeof(*quirk));
mirror = quirk->data = g_malloc0(sizeof(*mirror));
- mirror->mem = quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 1);
+ mirror->mem = quirk->mem = g_malloc0(sizeof(MemoryRegion));
quirk->nr_mem = 1;
mirror->vdev = vdev;
mirror->offset = 0x1800;
@@ -938,7 +938,7 @@ static void vfio_probe_rtl8168_bar2_quirk(VFIOPCIDevice *vdev, int nr)
}
quirk = g_malloc0(sizeof(*quirk));
- quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 2);
+ quirk->mem = g_malloc0(sizeof(MemoryRegion) * 2);
quirk->nr_mem = 2;
quirk->data = rtl = g_malloc0(sizeof(*rtl));
rtl->vdev = vdev;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/1] VFIO - fix glib 2.22 compat
2015-09-25 17:06 [Qemu-devel] [PULL 0/1] VFIO - fix glib 2.22 compat Alex Williamson
2015-09-25 17:07 ` [Qemu-devel] [PULL 1/1] vfio/pci: Remove use of g_malloc0_n() from quirks Alex Williamson
@ 2015-09-25 20:52 ` Peter Maydell
1 sibling, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-09-25 20:52 UTC (permalink / raw)
To: Alex Williamson; +Cc: QEMU Developers
On 25 September 2015 at 10:06, Alex Williamson
<alex.williamson@redhat.com> wrote:
> Hi Peter,
>
> I'll likely have another pull next week, but I don't want to sit on
> this trivial fix for glib 2.22 compatability. Thanks,
>
> Alex
>
> The following changes since commit fefa4b128de06cec6d513f00ee61e8208aed4a87:
>
> Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20150923.0' into staging (2015-09-23 21:39:46 +0100)
>
> are available in the git repository at:
>
>
> git://github.com/awilliam/qemu-vfio.git tags/vfio-update-20150925.0
>
> for you to fetch changes up to 9d146b2e2fbc1c2e42be1e3ee6c0d507ea79f0f9:
>
> vfio/pci: Remove use of g_malloc0_n() from quirks (2015-09-23 21:27:17 -0600)
>
> ----------------------------------------------------------------
> VFIO updates 2015-09-25
>
> - Remove use of g_malloc0_n for glib2.22 compat
>
> ----------------------------------------------------------------
> Alex Williamson (1):
> vfio/pci: Remove use of g_malloc0_n() from quirks
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 1/1] vfio/pci: Remove use of g_malloc0_n() from quirks
2015-09-25 17:07 ` [Qemu-devel] [PULL 1/1] vfio/pci: Remove use of g_malloc0_n() from quirks Alex Williamson
@ 2015-09-28 6:53 ` Markus Armbruster
0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2015-09-28 6:53 UTC (permalink / raw)
To: Alex Williamson; +Cc: qemu-devel
Alex Williamson <alex.williamson@redhat.com> writes:
> For compatibility with glib 2.22.
>
> Reported-by: Wen Congyang <wency@cn.fujitsu.com>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
> hw/vfio/pci-quirks.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
> index 2bdaef1..c675d1b 100644
> --- a/hw/vfio/pci-quirks.c
> +++ b/hw/vfio/pci-quirks.c
> @@ -284,7 +284,7 @@ static void vfio_vga_probe_ati_3c3_quirk(VFIOPCIDevice *vdev)
> }
>
> quirk = g_malloc0(sizeof(*quirk));
> - quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 1);
> + quirk->mem = g_malloc0(sizeof(MemoryRegion));
> quirk->nr_mem = 1;
>
> memory_region_init_io(quirk->mem, OBJECT(vdev), &vfio_ati_3c3_quirk, vdev,
g_new0(MemoryRegion, 1) is a bit neater. Followup patch coming.
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-28 6:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-25 17:06 [Qemu-devel] [PULL 0/1] VFIO - fix glib 2.22 compat Alex Williamson
2015-09-25 17:07 ` [Qemu-devel] [PULL 1/1] vfio/pci: Remove use of g_malloc0_n() from quirks Alex Williamson
2015-09-28 6:53 ` Markus Armbruster
2015-09-25 20:52 ` [Qemu-devel] [PULL 0/1] VFIO - fix glib 2.22 compat Peter Maydell
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).