* [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
@ 2017-07-28 13:11 Olaf Hering
2017-07-28 19:19 ` Eric Blake
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Olaf Hering @ 2017-07-28 13:11 UTC (permalink / raw)
To: Stefano Stabellini, Anthony Perard, Kevin Wolf, Max Reitz,
open list:X86, open list:Block layer core,
open list:All patches CC here
Cc: Olaf Hering
g_malloc0_n is available since glib-2.24. To allow build with older glib
versions use the generic g_new0, which is already used in many other
places in the code.
Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared rings")
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
hw/block/xen_disk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index d42ed7070d..536e2ee735 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -1232,7 +1232,7 @@ static int blk_connect(struct XenDevice *xendev)
return -1;
}
- domids = g_malloc0_n(blkdev->nr_ring_ref, sizeof(uint32_t));
+ domids = g_new0(uint32_t, blkdev->nr_ring_ref);
for (i = 0; i < blkdev->nr_ring_ref; i++) {
domids[i] = blkdev->xendev.dom;
}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 13:11 [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build Olaf Hering
2017-07-28 19:19 ` Eric Blake
@ 2017-07-28 19:19 ` Eric Blake
2017-07-28 20:49 ` Philippe Mathieu-Daudé
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Eric Blake @ 2017-07-28 19:19 UTC (permalink / raw)
To: Olaf Hering, Stefano Stabellini, Anthony Perard, Kevin Wolf,
Max Reitz, open list:X86, open list:Block layer core,
open list:All patches CC here
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]
On 07/28/2017 08:11 AM, Olaf Hering wrote:
> g_malloc0_n is available since glib-2.24. To allow build with older glib
s/is/is only/
> versions use the generic g_new0, which is already used in many other
> places in the code.
>
> Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared rings")
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
> hw/block/xen_disk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 13:11 [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build Olaf Hering
@ 2017-07-28 19:19 ` Eric Blake
2017-07-28 19:19 ` Eric Blake
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Eric Blake @ 2017-07-28 19:19 UTC (permalink / raw)
To: Olaf Hering, Stefano Stabellini, Anthony Perard, Kevin Wolf,
Max Reitz, open list:X86, open list:Block layer core,
open list:All patches CC here
[-- Attachment #1.1.1: Type: text/plain, Size: 637 bytes --]
On 07/28/2017 08:11 AM, Olaf Hering wrote:
> g_malloc0_n is available since glib-2.24. To allow build with older glib
s/is/is only/
> versions use the generic g_new0, which is already used in many other
> places in the code.
>
> Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared rings")
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
> hw/block/xen_disk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 13:11 [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build Olaf Hering
2017-07-28 19:19 ` Eric Blake
2017-07-28 19:19 ` Eric Blake
@ 2017-07-28 20:49 ` Philippe Mathieu-Daudé
2017-07-28 21:00 ` Peter Maydell
` (2 more replies)
2017-07-28 20:49 ` Philippe Mathieu-Daudé
` (2 subsequent siblings)
5 siblings, 3 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-07-28 20:49 UTC (permalink / raw)
To: Olaf Hering, Kevin Wolf, Max Reitz, open list:All patches CC here
Cc: Stefano Stabellini, Anthony Perard, open list:X86,
open list:Block layer core
Hi Olaf,
On 07/28/2017 10:11 AM, Olaf Hering wrote:
> g_malloc0_n is available since glib-2.24. To allow build with older glib
> versions use the generic g_new0, which is already used in many other
> places in the code.
Can you provide information about which
distrib/release/version/[packages?] you used? So we might add the same
setup in QEMU continuous integration system.
Thank,
Phil.
>
> Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared rings")
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
> hw/block/xen_disk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> index d42ed7070d..536e2ee735 100644
> --- a/hw/block/xen_disk.c
> +++ b/hw/block/xen_disk.c
> @@ -1232,7 +1232,7 @@ static int blk_connect(struct XenDevice *xendev)
> return -1;
> }
>
> - domids = g_malloc0_n(blkdev->nr_ring_ref, sizeof(uint32_t));
> + domids = g_new0(uint32_t, blkdev->nr_ring_ref);
> for (i = 0; i < blkdev->nr_ring_ref; i++) {
> domids[i] = blkdev->xendev.dom;
> }
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 13:11 [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build Olaf Hering
` (2 preceding siblings ...)
2017-07-28 20:49 ` Philippe Mathieu-Daudé
@ 2017-07-28 20:49 ` Philippe Mathieu-Daudé
2017-07-28 22:32 ` Stefano Stabellini
2017-07-28 22:32 ` Stefano Stabellini
5 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-07-28 20:49 UTC (permalink / raw)
To: Olaf Hering, Kevin Wolf, Max Reitz, open list:All patches CC here
Cc: Anthony Perard, open list:X86, Stefano Stabellini,
open list:Block layer core
Hi Olaf,
On 07/28/2017 10:11 AM, Olaf Hering wrote:
> g_malloc0_n is available since glib-2.24. To allow build with older glib
> versions use the generic g_new0, which is already used in many other
> places in the code.
Can you provide information about which
distrib/release/version/[packages?] you used? So we might add the same
setup in QEMU continuous integration system.
Thank,
Phil.
>
> Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared rings")
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
> hw/block/xen_disk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> index d42ed7070d..536e2ee735 100644
> --- a/hw/block/xen_disk.c
> +++ b/hw/block/xen_disk.c
> @@ -1232,7 +1232,7 @@ static int blk_connect(struct XenDevice *xendev)
> return -1;
> }
>
> - domids = g_malloc0_n(blkdev->nr_ring_ref, sizeof(uint32_t));
> + domids = g_new0(uint32_t, blkdev->nr_ring_ref);
> for (i = 0; i < blkdev->nr_ring_ref; i++) {
> domids[i] = blkdev->xendev.dom;
> }
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 20:49 ` Philippe Mathieu-Daudé
@ 2017-07-28 21:00 ` Peter Maydell
2017-07-28 22:29 ` Stefano Stabellini
2017-07-28 22:29 ` Stefano Stabellini
2 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2017-07-28 21:00 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Olaf Hering, Kevin Wolf, Max Reitz,
open list:All patches CC here, Anthony Perard, open list:X86,
Stefano Stabellini, open list:Block layer core
On 28 July 2017 at 21:49, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Hi Olaf,
>
> On 07/28/2017 10:11 AM, Olaf Hering wrote:
>>
>> g_malloc0_n is available since glib-2.24. To allow build with older glib
>> versions use the generic g_new0, which is already used in many other
>> places in the code.
>
>
> Can you provide information about which distrib/release/version/[packages?]
> you used? So we might add the same setup in QEMU continuous integration
> system.
I do have a build system with our oldest supported glib
version (it's my OSX box), and I have a feeling one of the
patchew centos configs does this too, but I guess neither
of them have the Xen headers to enable the Xen code,
which is why this one slipped through.
thanks
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
@ 2017-07-28 21:00 ` Peter Maydell
0 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2017-07-28 21:00 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, Olaf Hering, Stefano Stabellini,
open list:Block layer core, open list:All patches CC here,
Max Reitz, Anthony Perard, open list:X86
On 28 July 2017 at 21:49, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Hi Olaf,
>
> On 07/28/2017 10:11 AM, Olaf Hering wrote:
>>
>> g_malloc0_n is available since glib-2.24. To allow build with older glib
>> versions use the generic g_new0, which is already used in many other
>> places in the code.
>
>
> Can you provide information about which distrib/release/version/[packages?]
> you used? So we might add the same setup in QEMU continuous integration
> system.
I do have a build system with our oldest supported glib
version (it's my OSX box), and I have a feeling one of the
patchew centos configs does this too, but I guess neither
of them have the Xen headers to enable the Xen code,
which is why this one slipped through.
thanks
-- PMM
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 20:49 ` Philippe Mathieu-Daudé
2017-07-28 21:00 ` Peter Maydell
2017-07-28 22:29 ` Stefano Stabellini
@ 2017-07-28 22:29 ` Stefano Stabellini
2 siblings, 0 replies; 11+ messages in thread
From: Stefano Stabellini @ 2017-07-28 22:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Olaf Hering, Kevin Wolf, Max Reitz,
open list:All patches CC here, Stefano Stabellini,
Anthony Perard, open list:X86, open list:Block layer core
On Fri, 28 Jul 2017, Philippe Mathieu-Daudé wrote:
> Hi Olaf,
>
> On 07/28/2017 10:11 AM, Olaf Hering wrote:
> > g_malloc0_n is available since glib-2.24. To allow build with older glib
> > versions use the generic g_new0, which is already used in many other
> > places in the code.
>
> Can you provide information about which distrib/release/version/[packages?]
> you used? So we might add the same setup in QEMU continuous integration
> system.
FYI http://marc.info/?l=qemu-devel&m=150113545516942&w=2
> >
> > Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared
> > rings")
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > ---
> > hw/block/xen_disk.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> > index d42ed7070d..536e2ee735 100644
> > --- a/hw/block/xen_disk.c
> > +++ b/hw/block/xen_disk.c
> > @@ -1232,7 +1232,7 @@ static int blk_connect(struct XenDevice *xendev)
> > return -1;
> > }
> > - domids = g_malloc0_n(blkdev->nr_ring_ref, sizeof(uint32_t));
> > + domids = g_new0(uint32_t, blkdev->nr_ring_ref);
> > for (i = 0; i < blkdev->nr_ring_ref; i++) {
> > domids[i] = blkdev->xendev.dom;
> > }
> >
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 20:49 ` Philippe Mathieu-Daudé
2017-07-28 21:00 ` Peter Maydell
@ 2017-07-28 22:29 ` Stefano Stabellini
2017-07-28 22:29 ` Stefano Stabellini
2 siblings, 0 replies; 11+ messages in thread
From: Stefano Stabellini @ 2017-07-28 22:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, Olaf Hering, Stefano Stabellini,
open list:Block layer core, open list:All patches CC here,
Max Reitz, Anthony Perard, open list:X86
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1272 bytes --]
On Fri, 28 Jul 2017, Philippe Mathieu-Daudé wrote:
> Hi Olaf,
>
> On 07/28/2017 10:11 AM, Olaf Hering wrote:
> > g_malloc0_n is available since glib-2.24. To allow build with older glib
> > versions use the generic g_new0, which is already used in many other
> > places in the code.
>
> Can you provide information about which distrib/release/version/[packages?]
> you used? So we might add the same setup in QEMU continuous integration
> system.
FYI http://marc.info/?l=qemu-devel&m=150113545516942&w=2
> >
> > Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared
> > rings")
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > ---
> > hw/block/xen_disk.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> > index d42ed7070d..536e2ee735 100644
> > --- a/hw/block/xen_disk.c
> > +++ b/hw/block/xen_disk.c
> > @@ -1232,7 +1232,7 @@ static int blk_connect(struct XenDevice *xendev)
> > return -1;
> > }
> > - domids = g_malloc0_n(blkdev->nr_ring_ref, sizeof(uint32_t));
> > + domids = g_new0(uint32_t, blkdev->nr_ring_ref);
> > for (i = 0; i < blkdev->nr_ring_ref; i++) {
> > domids[i] = blkdev->xendev.dom;
> > }
> >
>
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 13:11 [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build Olaf Hering
` (3 preceding siblings ...)
2017-07-28 20:49 ` Philippe Mathieu-Daudé
@ 2017-07-28 22:32 ` Stefano Stabellini
2017-07-28 22:32 ` Stefano Stabellini
5 siblings, 0 replies; 11+ messages in thread
From: Stefano Stabellini @ 2017-07-28 22:32 UTC (permalink / raw)
To: Olaf Hering
Cc: Stefano Stabellini, Anthony Perard, Kevin Wolf, Max Reitz,
open list:X86, open list:Block layer core,
open list:All patches CC here
On Fri, 28 Jul 2017, Olaf Hering wrote:
> g_malloc0_n is available since glib-2.24. To allow build with older glib
> versions use the generic g_new0, which is already used in many other
> places in the code.
>
> Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared rings")
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
I'll add it to my queue
> ---
> hw/block/xen_disk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> index d42ed7070d..536e2ee735 100644
> --- a/hw/block/xen_disk.c
> +++ b/hw/block/xen_disk.c
> @@ -1232,7 +1232,7 @@ static int blk_connect(struct XenDevice *xendev)
> return -1;
> }
>
> - domids = g_malloc0_n(blkdev->nr_ring_ref, sizeof(uint32_t));
> + domids = g_new0(uint32_t, blkdev->nr_ring_ref);
> for (i = 0; i < blkdev->nr_ring_ref; i++) {
> domids[i] = blkdev->xendev.dom;
> }
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] xen-disk: use g_new0 to fix build
2017-07-28 13:11 [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build Olaf Hering
` (4 preceding siblings ...)
2017-07-28 22:32 ` Stefano Stabellini
@ 2017-07-28 22:32 ` Stefano Stabellini
5 siblings, 0 replies; 11+ messages in thread
From: Stefano Stabellini @ 2017-07-28 22:32 UTC (permalink / raw)
To: Olaf Hering
Cc: Kevin Wolf, Stefano Stabellini, open list:Block layer core,
open list:All patches CC here, Max Reitz, Anthony Perard,
open list:X86
On Fri, 28 Jul 2017, Olaf Hering wrote:
> g_malloc0_n is available since glib-2.24. To allow build with older glib
> versions use the generic g_new0, which is already used in many other
> places in the code.
>
> Fixes commit 3284fad728 ("xen-disk: add support for multi-page shared rings")
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
I'll add it to my queue
> ---
> hw/block/xen_disk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> index d42ed7070d..536e2ee735 100644
> --- a/hw/block/xen_disk.c
> +++ b/hw/block/xen_disk.c
> @@ -1232,7 +1232,7 @@ static int blk_connect(struct XenDevice *xendev)
> return -1;
> }
>
> - domids = g_malloc0_n(blkdev->nr_ring_ref, sizeof(uint32_t));
> + domids = g_new0(uint32_t, blkdev->nr_ring_ref);
> for (i = 0; i < blkdev->nr_ring_ref; i++) {
> domids[i] = blkdev->xendev.dom;
> }
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-07-28 22:32 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28 13:11 [Qemu-devel] [PATCH v2] xen-disk: use g_new0 to fix build Olaf Hering
2017-07-28 19:19 ` Eric Blake
2017-07-28 19:19 ` Eric Blake
2017-07-28 20:49 ` Philippe Mathieu-Daudé
2017-07-28 21:00 ` Peter Maydell
2017-07-28 21:00 ` Peter Maydell
2017-07-28 22:29 ` Stefano Stabellini
2017-07-28 22:29 ` Stefano Stabellini
2017-07-28 20:49 ` Philippe Mathieu-Daudé
2017-07-28 22:32 ` Stefano Stabellini
2017-07-28 22:32 ` Stefano Stabellini
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.