Skip to content

Commit d38253c

Browse files
committed
block/nvme: drop tautologous assertion
nvme_process_completion() explicitly checks cid so the assertion that follows is always true: if (cid == 0 || cid > NVME_QUEUE_SIZE) { ... continue; } assert(cid <= NVME_QUEUE_SIZE); Signed-off-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Sergio Lopez <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
1 parent 2446e0e commit d38253c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

block/nvme.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ static bool nvme_process_completion(BDRVNVMeState *s, NVMeQueuePair *q)
336336
cid);
337337
continue;
338338
}
339-
assert(cid <= NVME_QUEUE_SIZE);
340339
trace_nvme_complete_command(s, q->index, cid);
341340
preq = &q->reqs[cid - 1];
342341
req = *preq;

0 commit comments

Comments
 (0)