Patchwork [4/6] hw/pflash_cfi02.c: Mark deliberate fallthrough

login
register
mail settings
Submitter Peter Maydell
Date Jan. 21, 2013, 12:50 p.m.
Message ID <1358772656-7406-5-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/214153/
State New
Headers show

Comments

Peter Maydell - Jan. 21, 2013, 12:50 p.m.
Mark the deliberate fallthrough where we treat the case of
an attempt to read flash when it is an unknown command
state as if it were a normal read.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/pflash_cfi02.c |    1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c
index cfb91cb..d66c0ca 100644
--- a/hw/pflash_cfi02.c
+++ b/hw/pflash_cfi02.c
@@ -157,6 +157,7 @@  static uint32_t pflash_read (pflash_t *pfl, hwaddr offset,
         DPRINTF("%s: unknown command state: %x\n", __func__, pfl->cmd);
         pfl->wcycle = 0;
         pfl->cmd = 0;
+        /* fall through to the read code */
     case 0x80:
         /* We accept reads during second unlock sequence... */
     case 0x00: