From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:54505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gugJR-0001TU-Bm for qemu-devel@nongnu.org; Fri, 15 Feb 2019 11:26:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gugJQ-0007Gn-EX for qemu-devel@nongnu.org; Fri, 15 Feb 2019 11:26:05 -0500 From: Paul Durrant Date: Fri, 15 Feb 2019 16:25:31 +0000 Message-ID: <20190215162533.19475-2-paul.durrant@citrix.com> In-Reply-To: <20190215162533.19475-1-paul.durrant@citrix.com> References: <20190215162533.19475-1-paul.durrant@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Subject: [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-block@nongnu.org, xen-devel@lists.xenproject.org Cc: Paul Durrant , Peter Maydell , Stefan Hajnoczi , Stefano Stabellini , Anthony Perard , Kevin Wolf , Max Reitz 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 --- Cc: Stefan Hajnoczi Cc: Stefano Stabellini Cc: Anthony Perard Cc: Kevin Wolf Cc: Max Reitz --- 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); -- 2.20.1.2.gb21ebb6