From patchwork Wed Nov 9 17:42:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 4983 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 43C0623E03 for ; Wed, 9 Nov 2011 17:42:29 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 32ED0A1815D for ; Wed, 9 Nov 2011 17:42:29 +0000 (UTC) Received: by faan26 with SMTP id n26so2708519faa.11 for ; Wed, 09 Nov 2011 09:42:29 -0800 (PST) Received: by 10.152.109.199 with SMTP id hu7mr2240265lab.16.1320860548830; Wed, 09 Nov 2011 09:42:28 -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.152.10.72 with SMTP id g8cs179786lab; Wed, 9 Nov 2011 09:42:28 -0800 (PST) Received: by 10.216.164.78 with SMTP id b56mr635589wel.42.1320860546480; Wed, 09 Nov 2011 09:42:26 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id h17si3139954wee.101.2011.11.09.09.42.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Nov 2011 09:42:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1ROCAJ-0002VD-WA; Wed, 09 Nov 2011 17:42:23 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Andrzej Zaborowski Subject: [PATCH] hw/omap_gpmc.c: Add missing 'break's to fix 8 bit NAND writes Date: Wed, 9 Nov 2011 17:42:23 +0000 Message-Id: <1320860543-9596-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 Add missing 'break' statements which would have meant that writing to an 8 bit NAND device was broken. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell --- This is an embarrassing bug... hw/omap_gpmc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/omap_gpmc.c b/hw/omap_gpmc.c index 7fc82a2..414f9f5 100644 --- a/hw/omap_gpmc.c +++ b/hw/omap_gpmc.c @@ -180,6 +180,7 @@ static void omap_nand_setio(DeviceState *dev, uint64_t value, nand_setio(dev, (value >> 24) & 0xff); break; } + break; case OMAP_GPMC_16BIT: switch (size) { case 1: @@ -195,6 +196,7 @@ static void omap_nand_setio(DeviceState *dev, uint64_t value, nand_setio(dev, (value >> 16) & 0xffff); break; } + break; } }