From: Paul Durrant Date: Fri, 15 Feb 2019 16:25:31 +0000 (+0000) Subject: dataplane/xen-block: remove dead code X-Git-Tag: v4.0.0-rc0~69^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e02d94941d9c26035d5c2e5075c83afbe8c5eaef;p=thirdparty%2Fqemu.git dataplane/xen-block: remove dead code The if() statement is clearly bogus (dead code which should have been cleaned up when grant mapping was removed). Spotted by Coverity: CID 1398635 While in the neighbourhood, add a missing 'fall through' annotation. Reported-by: Peter Maydell Signed-off-by: Paul Durrant Acked-by: Anthony PERARD Message-Id: <20190215162533.19475-2-paul.durrant@citrix.com> Signed-off-by: Anthony PERARD --- diff --git a/hw/block/dataplane/xen-block.c b/hw/block/dataplane/xen-block.c index c6a15da0243..f1523c5b45f 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);