All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jules Wang <junqing.wang@cs2c.com.cn>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] dma-helpers: avoid calling dma_bdrv_unmap() twice
Date: Fri, 23 May 2014 10:23:25 +0200	[thread overview]
Message-ID: <537F057D.1070503@redhat.com> (raw)
In-Reply-To: <1400816645-16005-1-git-send-email-junqing.wang@cs2c.com.cn>

Il 23/05/2014 05:44, Jules Wang ha scritto:
> Calling dma_bdrv_unmap() twice is not necessary and may cause
> potential problems if some code changes.
>
> Signed-off-by: Jules Wang <junqing.wang@cs2c.com.cn>
> ---
>  dma-helpers.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/dma-helpers.c b/dma-helpers.c
> index 5f421e9..53cbe92 100644
> --- a/dma-helpers.c
> +++ b/dma-helpers.c
> @@ -143,12 +143,12 @@ static void dma_bdrv_cb(void *opaque, int ret)
>
>      dbs->acb = NULL;
>      dbs->sector_num += dbs->iov.size / 512;
> -    dma_bdrv_unmap(dbs);
>
>      if (dbs->sg_cur_index == dbs->sg->nsg || ret < 0) {
>          dma_complete(dbs, ret);
>          return;
>      }
> +    dma_bdrv_unmap(dbs);
>
>      while (dbs->sg_cur_index < dbs->sg->nsg) {
>          cur_addr = dbs->sg->sg[dbs->sg_cur_index].base + dbs->sg_cur_byte;
>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>


WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jules Wang <junqing.wang@cs2c.com.cn>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] dma-helpers: avoid calling dma_bdrv_unmap() twice
Date: Fri, 23 May 2014 10:23:25 +0200	[thread overview]
Message-ID: <537F057D.1070503@redhat.com> (raw)
In-Reply-To: <1400816645-16005-1-git-send-email-junqing.wang@cs2c.com.cn>

Il 23/05/2014 05:44, Jules Wang ha scritto:
> Calling dma_bdrv_unmap() twice is not necessary and may cause
> potential problems if some code changes.
>
> Signed-off-by: Jules Wang <junqing.wang@cs2c.com.cn>
> ---
>  dma-helpers.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/dma-helpers.c b/dma-helpers.c
> index 5f421e9..53cbe92 100644
> --- a/dma-helpers.c
> +++ b/dma-helpers.c
> @@ -143,12 +143,12 @@ static void dma_bdrv_cb(void *opaque, int ret)
>
>      dbs->acb = NULL;
>      dbs->sector_num += dbs->iov.size / 512;
> -    dma_bdrv_unmap(dbs);
>
>      if (dbs->sg_cur_index == dbs->sg->nsg || ret < 0) {
>          dma_complete(dbs, ret);
>          return;
>      }
> +    dma_bdrv_unmap(dbs);
>
>      while (dbs->sg_cur_index < dbs->sg->nsg) {
>          cur_addr = dbs->sg->sg[dbs->sg_cur_index].base + dbs->sg_cur_byte;
>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2014-05-23  8:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23  3:44 [Qemu-trivial] [PATCH] dma-helpers: avoid calling dma_bdrv_unmap() twice Jules Wang
2014-05-23  3:44 ` [Qemu-devel] " Jules Wang
2014-05-23  8:23 ` Paolo Bonzini [this message]
2014-05-23  8:23   ` Paolo Bonzini
2014-05-23 20:32 ` [Qemu-trivial] " Michael Tokarev
2014-05-23 20:32   ` [Qemu-devel] " Michael Tokarev

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=537F057D.1070503@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=junqing.wang@cs2c.com.cn \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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.