All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] hw/block/onenand: Remove dead code block
@ 2017-10-03  9:57 ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2017-10-03  9:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, qemu-trivial, Kevin Wolf, Max Reitz

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 <thuth@redhat.com>
---
 hw/block/onenand.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index 30e40f3..de65c9e 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;
 
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-04 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03  9:57 [Qemu-trivial] [PATCH] hw/block/onenand: Remove dead code block Thomas Huth
2017-10-03  9:57 ` [Qemu-devel] " Thomas Huth
2017-10-03 10:25 ` [Qemu-trivial] " Laurent Vivier
2017-10-03 10:25   ` [Qemu-devel] " Laurent Vivier
2017-10-04 15:10   ` Kevin Wolf
2017-10-04 15:10     ` [Qemu-devel] " Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.