qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/block/onenand: Remove dead code block
@ 2017-10-03  9:57 Thomas Huth
  2017-10-03 10:25 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

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

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).