qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Paul Durrant <paul.durrant@citrix.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	xen-devel@lists.xenproject.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Max Reitz <mreitz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Anthony Perard <anthony.perard@citrix.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code
Date: Fri, 15 Feb 2019 21:38:59 +0100	[thread overview]
Message-ID: <9c6c6f2e-cac0-9e75-d5e2-baf613aad6b7@redhat.com> (raw)
In-Reply-To: <20190215162533.19475-2-paul.durrant@citrix.com>

On 2/15/19 5:25 PM, Paul Durrant wrote:
> The if() statement is clearly bogus (dead code which should have been
> cleaned up when grant mapping was removed).

"... was removed in 06454c24ad)."

> 
> Spotted by Coverity: CID 1398635
> 
> While in the neighbourhood, add a missing 'fall through' annotation.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Max Reitz <mreitz@redhat.com>
> ---
>  hw/block/dataplane/xen-block.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/hw/block/dataplane/xen-block.c b/hw/block/dataplane/xen-block.c
> index c6a15da024..f1523c5b45 100644
> --- a/hw/block/dataplane/xen-block.c
> +++ b/hw/block/dataplane/xen-block.c
> @@ -281,10 +281,6 @@ static void xen_block_complete_aio(void *opaque, int ret)
>          break;
>      case BLKIF_OP_WRITE:
>      case BLKIF_OP_FLUSH_DISKCACHE:
> -        if (!request->req.nr_segments) {
> -            break;
> -        }
> -        break;
>      default:
>          break;
>      }
> @@ -298,6 +294,7 @@ static void xen_block_complete_aio(void *opaque, int ret)
>          if (!request->req.nr_segments) {
>              break;
>          }
> +        /* fall through */
>      case BLKIF_OP_READ:
>          if (request->status == BLKIF_RSP_OKAY) {
>              block_acct_done(blk_get_stats(dataplane->blk), &request->acct);
> 

  reply	other threads:[~2019-02-15 20:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15 16:25 [Qemu-devel] [PATCH 0/3] Coverity fixes Paul Durrant
2019-02-15 16:25 ` [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code Paul Durrant
2019-02-15 20:38   ` Philippe Mathieu-Daudé [this message]
2019-02-18 14:27     ` Anthony PERARD
2019-02-15 16:25 ` [Qemu-devel] [PATCH 2/3] xen-block: remove redundant assignment Paul Durrant
2019-02-18 14:43   ` Anthony PERARD
2019-02-15 16:25 ` [Qemu-devel] [PATCH 3/3] xen-block: report error condition from vbd_name_to_disk() Paul Durrant
2019-02-18 15:43   ` Anthony PERARD

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=9c6c6f2e-cac0-9e75-d5e2-baf613aad6b7@redhat.com \
    --to=philmd@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=paul.durrant@citrix.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=stefanha@redhat.com \
    --cc=xen-devel@lists.xenproject.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 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).