From patchwork Fri Mar 4 10:13:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Liu X-Patchwork-Id: 308 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:38 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs9474qah; Fri, 4 Mar 2011 02:13:46 -0800 (PST) Received: by 10.42.138.195 with SMTP id d3mr403293icu.241.1299233625816; Fri, 04 Mar 2011 02:13:45 -0800 (PST) Received: from mail-iw0-f178.google.com (mail-iw0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id uy2si4922908icb.70.2011.03.04.02.13.45 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 02:13:45 -0800 (PST) Received-SPF: pass (google.com: domain of liu.h.jason@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of liu.h.jason@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=liu.h.jason@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by iwn9 with SMTP id 9so2238360iwn.37 for ; Fri, 04 Mar 2011 02:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=ty0zqgLhFV8IXOxb1SH1akwQHRYp5dGRTrePWbYzb4s=; b=J7J2Htl/A8o4rCE25OcX9yjsTBwAzgTSrRPn2dNJd5Peje4x9wBXZ+8PXsFOhI1+aD YJTHefOoVreH9SH+hHS4h10SxZfjvA8huy/Chx9o+wfZVprPMc+aNbKvx+TjtMePC3+T K/NdL5iE8A7gH5GqOxbX1CH8O6T9H80aEuaK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HWbQpqcgfBGbLSvgqZaL6kbBZybyyCysn6CRz/vFqmY4TuPtRsXP0kBeUJIoywjPyu 1s/XBxABfdqlY/AayiwTO0GVp+whoUM3V/vWXSxRX6mQt7YSbjUvuBUEsNSFUGIpI18W Y2ZzdHqdheZyLv/JKCXGAJOWYt2RiVc65mSes= MIME-Version: 1.0 Received: by 10.43.68.129 with SMTP id xy1mr473006icb.129.1299233625420; Fri, 04 Mar 2011 02:13:45 -0800 (PST) Received: by 10.42.227.4 with HTTP; Fri, 4 Mar 2011 02:13:45 -0800 (PST) In-Reply-To: <1298610378-3105-1-git-send-email-r64343@freescale.com> References: <1298610378-3105-1-git-send-email-r64343@freescale.com> Date: Fri, 4 Mar 2011 18:13:45 +0800 Message-ID: Subject: Fwd: [PATCH] mtd: nand: fix one typo in the comments From: Jason Liu To: patches@linaro.org ---------- Forwarded message ---------- From: Jason Liu Date: 2011/2/25 Subject: [PATCH] mtd: nand: fix one typo in the comments To: linux-arm-kernel@lists.infradead.org 抄送: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, David.Woodhouse@intel.com, dedekind1@gmail.com In the function nand_do_write_oob, the comments has one typo, this patch fix it. - /* Do not allow reads past end of device */ + /* Do not allow write past end of device */ if (unlikely(to >= mtd->size || ops->ooboffs + ops->ooblen > ((mtd->size >> chip->page_shift) - (to >> chip->page_shift)) * len)) { DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt write beyond " "end of device\n", __func__); return -EINVAL; } Signed-off-by: Jason Liu --- drivers/mtd/nand/nand_base.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ((mtd->size >> chip->page_shift) - -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index a9c6ce7..da76040 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2377,7 +2377,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, return -EINVAL; } - /* Do not allow reads past end of device */ + /* Do not allow write past end of device */ if (unlikely(to >= mtd->size || ops->ooboffs + ops->ooblen >