qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Ming Lei <ming.lei@canonical.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
	Anthony Liguori <aliguori@amazon.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 1/2] virtio-scsi: dataplane: fix allocation for 'cmd_vrings'
Date: Tue, 11 Nov 2014 12:03:38 +0100	[thread overview]
Message-ID: <5461ED0A.8020103@redhat.com> (raw)
In-Reply-To: <1415668630-30073-2-git-send-email-ming.lei@canonical.com>



On 11/11/2014 02:17, Ming Lei wrote:
> The size of each element should be sizeof(VirtIOSCSIVring *).
> 
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
>  hw/scsi/virtio-scsi-dataplane.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c
> index 855439e..df17229 100644
> --- a/hw/scsi/virtio-scsi-dataplane.c
> +++ b/hw/scsi/virtio-scsi-dataplane.c
> @@ -239,7 +239,7 @@ void virtio_scsi_dataplane_start(VirtIOSCSI *s)
>      if (!s->event_vring) {
>          goto fail_vrings;
>      }
> -    s->cmd_vrings = g_malloc0(sizeof(VirtIOSCSIVring) * vs->conf.num_queues);
> +    s->cmd_vrings = g_new(VirtIOSCSIVring *, vs->conf.num_queues);
>      for (i = 0; i < vs->conf.num_queues; i++) {
>          s->cmd_vrings[i] =
>              virtio_scsi_vring_init(s, vs->cmd_vqs[i],
> 

Applied, thanks.

Paolo

  parent reply	other threads:[~2014-11-11 11:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11  1:17 [Qemu-devel] [PATCH v1 0/2] virtio-scsi: dataplane: one fix and one optimization Ming Lei
2014-11-11  1:17 ` [Qemu-devel] [PATCH v1 1/2] virtio-scsi: dataplane: fix allocation for 'cmd_vrings' Ming Lei
2014-11-11  1:28   ` Fam Zheng
2014-11-11 11:03   ` Paolo Bonzini [this message]
2014-11-11  1:17 ` [Qemu-devel] [PATCH v1 2/2] virtio-scsi: dataplane: notify guest as batch Ming Lei
2014-11-11  1:52   ` Fam Zheng
2014-11-11  2:29     ` Ming Lei
2014-11-11  2:52       ` Fam Zheng
2014-11-11  3:08         ` Ming Lei
2014-11-11 17:28   ` Stefan Hajnoczi
2014-11-12  2:33     ` Ming Lei

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=5461ED0A.8020103@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=ming.lei@canonical.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).