diff options
author | Gonglei | 2014-11-15 11:06:44 +0100 |
---|---|---|
committer | Paolo Bonzini | 2014-11-17 11:43:09 +0100 |
commit | 720fdd6fa92df9041316e94816ab7e56abaed4e9 (patch) | |
tree | 01d117f64c72f3f6f628ef45b6ed165d25343bc9 /hw/block/nvme.c | |
parent | loader: fix NEGATIVE_RETURNS (diff) | |
download | qemu-720fdd6fa92df9041316e94816ab7e56abaed4e9.tar.gz qemu-720fdd6fa92df9041316e94816ab7e56abaed4e9.tar.xz qemu-720fdd6fa92df9041316e94816ab7e56abaed4e9.zip |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index b6263dcabc..13276589e4 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; } |