[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 22/54] hw/block/onenand: Remove dead code block
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 22/54] hw/block/onenand: Remove dead code block |
Date: |
Fri, 6 Oct 2017 17:53:50 +0200 |
From: Thomas Huth <address@hidden>
The condition of the for-loop makes sure that b is always smaller
than s->blocks, so the "if (b >= s->blocks)" statement is completely
superfluous here.
Buglink: https://bugs.launchpad.net/qemu/+bug/1715007
Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/block/onenand.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index 30e40f3914..de65c9ebb9 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -520,10 +520,6 @@ static void onenand_command(OneNANDState *s)
s->intstatus |= ONEN_INT;
for (b = 0; b < s->blocks; b ++) {
- if (b >= s->blocks) {
- s->status |= ONEN_ERR_CMD;
- break;
- }
if (s->blockwp[b] == ONEN_LOCK_LOCKTIGHTEN)
break;
--
2.13.6
- [Qemu-block] [PULL 16/54] mirror: Switch mirror_dirty_init() to byte-based iteration, (continued)
- [Qemu-block] [PULL 16/54] mirror: Switch mirror_dirty_init() to byte-based iteration, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 15/54] dirty-bitmap: Change bdrv_[re]set_dirty_bitmap() to use bytes, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 13/54] dirty-bitmap: Change bdrv_get_dirty_count() to report bytes, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 17/54] qcow2: Switch qcow2_measure() to byte-based iteration, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 14/54] dirty-bitmap: Change bdrv_get_dirty_locked() to take bytes, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 19/54] qcow2: Switch store_bitmap_data() to byte-based iteration, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 18/54] qcow2: Switch load_bitmap_data() to byte-based iteration, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 20/54] dirty-bitmap: Switch bdrv_set_dirty() to bytes, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 21/54] dirty-bitmap: Convert internal hbitmap size/granularity, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 23/54] qemu-iotests: remove dead code, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 22/54] hw/block/onenand: Remove dead code block,
Kevin Wolf <=
- [Qemu-block] [PULL 24/54] qemu-iotests: get rid of AWK_PROG, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 25/54] qemu-iotests: move "check" code out of common.rc, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 26/54] qemu-iotests: cleanup and fix search for programs, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 30/54] qemu-iotests: fix uninitialized variable, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 28/54] qemu-iotests: do not include common.rc in "check", Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 27/54] qemu-iotests: limit non-_PROG-suffixed variables to common.rc, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 31/54] qemu-iotests: get rid of $iam, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 29/54] qemu-iotests: disintegrate more parts of common.config, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 33/54] block: Introduce BdrvChildRole.update_filename, Kevin Wolf, 2017/10/06
- [Qemu-block] [PULL 32/54] qemu-iotests: merge "check" and "common", Kevin Wolf, 2017/10/06