]> Git Repo - qemu.git/commitdiff
dataplane/xen-block: remove dead code
authorPaul Durrant <[email protected]>
Fri, 15 Feb 2019 16:25:31 +0000 (16:25 +0000)
committerAnthony PERARD <[email protected]>
Thu, 28 Feb 2019 17:21:12 +0000 (17:21 +0000)
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 <[email protected]>
Signed-off-by: Paul Durrant <[email protected]>
Acked-by: Anthony PERARD <[email protected]>
Message-Id: <20190215162533[email protected]>
Signed-off-by: Anthony PERARD <[email protected]>
hw/block/dataplane/xen-block.c

index c6a15da02434c2626b16a88c8a4455014224f08c..f1523c5b45fa4ad5123bacefe4046d35e43d5988 100644 (file)
@@ -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);
This page took 0.026248 seconds and 4 git commands to generate.