aboutsummaryrefslogtreecommitdiff
path: root/hw/block/nvme.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-11-15 18:06:44 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2014-11-17 11:43:09 +0100
commit720fdd6fa92df9041316e94816ab7e56abaed4e9 (patch)
tree01d117f64c72f3f6f628ef45b6ed165d25343bc9 /hw/block/nvme.c
parentddd2eab72fbd383a56f439bf278c6d647abd4f54 (diff)
downloadqemu-720fdd6fa92df9041316e94816ab7e56abaed4e9.zip
qemu-720fdd6fa92df9041316e94816ab7e56abaed4e9.tar.gz
qemu-720fdd6fa92df9041316e94816ab7e56abaed4e9.tar.bz2
nvme: remove superfluous check
Operands don't affect result (CONSTANT_EXPRESSION_RESULT) ((n->bar.aqa >> AQA_ASQS_SHIFT) & AQA_ASQS_MASK) > 4095 is always false regardless of the values of its operands. This occurs as the logical second operand of '||'. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/block/nvme.c')
-rw-r--r--hw/block/nvme.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index b6263dc..1327658 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -583,8 +583,7 @@ static int nvme_start_ctrl(NvmeCtrl *n)
NVME_CC_IOCQES(n->bar.cc) > NVME_CTRL_CQES_MAX(n->id_ctrl.cqes) ||
NVME_CC_IOSQES(n->bar.cc) < NVME_CTRL_SQES_MIN(n->id_ctrl.sqes) ||
NVME_CC_IOSQES(n->bar.cc) > NVME_CTRL_SQES_MAX(n->id_ctrl.sqes) ||
- !NVME_AQA_ASQS(n->bar.aqa) || NVME_AQA_ASQS(n->bar.aqa) > 4095 ||
- !NVME_AQA_ACQS(n->bar.aqa) || NVME_AQA_ACQS(n->bar.aqa) > 4095) {
+ !NVME_AQA_ASQS(n->bar.aqa) || !NVME_AQA_ACQS(n->bar.aqa)) {
return -1;
}