From patchwork Wed Jan 13 14:36:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Ringle X-Patchwork-Id: 42825 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4C277B7C9F for ; Thu, 14 Jan 2010 01:52:43 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NV4Yh-0001gY-DX; Wed, 13 Jan 2010 14:50:56 +0000 Received: from [63.146.191.166] (helo=mail0.vertical.com) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NV4Ya-0001fa-E6 for linux-mtd@lists.infradead.org; Wed, 13 Jan 2010 14:50:53 +0000 X-ASG-Debug-ID: 1263393407-679700010000-6YE7NY X-Barracuda-URL: http://172.16.0.2:8000/cgi-bin/mark.cgi Received: from tpaex1.vertical.com (localhost [127.0.0.1]) by mail0.vertical.com (Spam & Virus Firewall) with ESMTP id 64FE6200520E; Wed, 13 Jan 2010 09:36:47 -0500 (EST) Received: from tpaex1.vertical.com ([172.16.0.10]) by mail0.vertical.com with ESMTP id XPor517FAZ67V5ue; Wed, 13 Jan 2010 09:36:47 -0500 (EST) X-Barracuda-Envelope-From: jon@ringle.org X-ASG-Whitelist: Sender Received: from localhost.localdomain ([172.17.128.28]) by tpaex1.vertical.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 13 Jan 2010 09:36:12 -0500 From: Jon Ringle X-Barracuda-BBL-IP: 172.17.128.28 X-Barracuda-RBL-IP: 172.17.128.28 To: linux-mtd@lists.infradead.org, dsaxena@mvista.com X-ASG-Orig-Subj: [PATCH] [MTD] maps/ixp4xx: Fix reading from half-word boundary Subject: [PATCH] [MTD] maps/ixp4xx: Fix reading from half-word boundary Date: Wed, 13 Jan 2010 09:36:10 -0500 Message-Id: <1263393370-3561-1-git-send-email-jon@ringle.org> X-Mailer: git-send-email 1.6.5.rc2 X-OriginalArrivalTime: 13 Jan 2010 14:36:13.0044 (UTC) FILETIME=[C15CE340:01CA945D] X-Barracuda-Connect: UNKNOWN[172.16.0.10] X-Barracuda-Start-Time: 1263393407 X-Barracuda-Virus-Scanned: by Barracuda Spam & Virus Firewall at vertical.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100113_095048_522166_D06BCCD4 X-CRM114-Status: GOOD ( 10.45 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS Cc: Jon Ringle , dedekind1@gmail.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org ixp4xx updates: - Fix handling of reads that don't start on a half-word boundary. Signed-off-by: Jon Ringle --- drivers/mtd/maps/ixp4xx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 7214b87..6b540a5 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c @@ -107,8 +107,8 @@ static void ixp4xx_copy_from(struct map_info *map, void *to, return; if (from & 1) { - *dest++ = BYTE1(flash_read16(src)); - src++; + *dest++ = BYTE1(flash_read16(src-1)); + src++; --len; }