[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/12] block/nvme: drop tautologous assertion
From: |
Stefan Hajnoczi |
Subject: |
[PULL 07/12] block/nvme: drop tautologous assertion |
Date: |
Wed, 24 Jun 2020 11:02:05 +0100 |
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 <stefanha@redhat.com>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200617132201.1832152-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
block/nvme.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/nvme.c b/block/nvme.c
index e4375ec245..d567ece3f4 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -336,7 +336,6 @@ static bool nvme_process_completion(BDRVNVMeState *s,
NVMeQueuePair *q)
cid);
continue;
}
- assert(cid <= NVME_QUEUE_SIZE);
trace_nvme_complete_command(s, q->index, cid);
preq = &q->reqs[cid - 1];
req = *preq;
--
2.26.2
- [PULL 00/12] Block patches, Stefan Hajnoczi, 2020/06/24
- [PULL 01/12] minikconf: explicitly set encoding to UTF-8, Stefan Hajnoczi, 2020/06/24
- [PULL 02/12] coroutine: support SafeStack in ucontext backend, Stefan Hajnoczi, 2020/06/24
- [PULL 03/12] coroutine: add check for SafeStack in sigaltstack, Stefan Hajnoczi, 2020/06/24
- [PULL 04/12] configure: add flags to support SafeStack, Stefan Hajnoczi, 2020/06/24
- [PULL 05/12] check-block: enable iotests with SafeStack, Stefan Hajnoczi, 2020/06/24
- [PULL 06/12] block/nvme: poll queues without q->lock, Stefan Hajnoczi, 2020/06/24
- [PULL 07/12] block/nvme: drop tautologous assertion,
Stefan Hajnoczi <=
- [PULL 08/12] block/nvme: don't access CQE after moving cq.head, Stefan Hajnoczi, 2020/06/24
- [PULL 09/12] block/nvme: switch to a NVMeRequest freelist, Stefan Hajnoczi, 2020/06/24
- [PULL 10/12] block/nvme: clarify that free_req_queue is protected by q->lock, Stefan Hajnoczi, 2020/06/24
- [PULL 11/12] block/nvme: keep BDRVNVMeState pointer in NVMeQueuePair, Stefan Hajnoczi, 2020/06/24
- [PULL 12/12] block/nvme: support nested aio_poll(), Stefan Hajnoczi, 2020/06/24
- Re: [PULL 00/12] Block patches, Peter Maydell, 2020/06/25