From patchwork Mon Jan 21 12:50:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14173 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 90FF923E08 for ; Mon, 21 Jan 2013 12:51:03 +0000 (UTC) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by fiordland.canonical.com (Postfix) with ESMTP id 10B13A18850 for ; Mon, 21 Jan 2013 12:51:02 +0000 (UTC) Received: by mail-vb0-f43.google.com with SMTP id fs19so5692202vbb.30 for ; Mon, 21 Jan 2013 04:51:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=N+Yk3whAgsKAIoD7YqDmaLrax1ipjIeVYT0jtdsHhOw=; b=MyAeusdyEjG3m9zaWRPkgZw7l17arWyA44pqzKkfGLjzYTp8HNdnbnpgC/jOh8srGU GdyOipUByyrdvChkkqhIf541B7rnsdz8mDE2wU/k8B7Pkn8ynLvUsxIDQV0iIEjsYQSt JA1BJ8FD8ThdD7mq1wjCagirb9gZefxdbn5Vz+cAGbO/D/sUswxjml2j7ark55MVGYdZ dOntfbQwN40g3Is3Dt/OXaMZ5yIOQu7mtpd4/USRtv7a7dTkHG9Iuh/iEOHi7ZCFO566 K3a5I7d8GQ/RSjWGxVTQMXMO/1WqIVk8dv/TFvZdbRl1m81kvDxdtv7xsDGMcdfVxiAZ QPbg== X-Received: by 10.52.16.6 with SMTP id b6mr13993098vdd.40.1358772662589; Mon, 21 Jan 2013 04:51:02 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp199548veb; Mon, 21 Jan 2013 04:51:01 -0800 (PST) X-Received: by 10.204.147.132 with SMTP id l4mr4902266bkv.20.1358772658855; Mon, 21 Jan 2013 04:50:58 -0800 (PST) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ig8si9833862bkc.189.2013.01.21.04.50.58 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:50:58 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TxGq1-0001w1-3u; Mon, 21 Jan 2013 12:50:57 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Blue Swirl Subject: [PATCH 4/6] hw/pflash_cfi02.c: Mark deliberate fallthrough Date: Mon, 21 Jan 2013 12:50:54 +0000 Message-Id: <1358772656-7406-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1358772656-7406-1-git-send-email-peter.maydell@linaro.org> References: <1358772656-7406-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQnBiMAGlg8QGcThUEpBP8PLzoUpg1j9F0vX6X7bdsBAeRNBSEENuqDpsp02sI0TMEl276Py 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 --- 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: