qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>, patches@linaro.org
Subject: [Qemu-devel] [PATCH 4/6] hw/pflash_cfi02.c: Mark deliberate fallthrough
Date: Mon, 21 Jan 2013 12:50:54 +0000	[thread overview]
Message-ID: <1358772656-7406-5-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1358772656-7406-1-git-send-email-peter.maydell@linaro.org>

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(+)

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:
-- 
1.7.9.5

  parent reply	other threads:[~2013-01-21 13:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 12:50 [Qemu-devel] [PATCH 0/6] arm devices: mark or remove implicit fallthroughs Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 1/6] hw/arm_sysctl.c: Add missing 'break' statements Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 2/6] hw/omap1.c: Add fallthrough markers and breaks Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 3/6] hw/omap_dma, hw/omap_spi: Explicitly mark fallthroughs Peter Maydell
2013-01-21 12:50 ` Peter Maydell [this message]
2013-01-21 12:50 ` [Qemu-devel] [PATCH 5/6] hw/smc91c111: Add explicit 'return' rather than relying on fallthrough Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 6/6] hw/pxa2xx_timer: Explicitly mark fallthroughs Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358772656-7406-5-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=blauwirbel@gmail.com \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).