From patchwork Mon Jul 12 14:59:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo Serra X-Patchwork-Id: 111436 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6CExUF0010382 for ; Mon, 12 Jul 2010 14:59:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755852Ab0GLO72 (ORCPT ); Mon, 12 Jul 2010 10:59:28 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:38289 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755809Ab0GLO72 convert rfc822-to-8bit (ORCPT ); Mon, 12 Jul 2010 10:59:28 -0400 Received: by pwi5 with SMTP id 5so1827356pwi.19 for ; Mon, 12 Jul 2010 07:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=o8JyuSr1+ApJvGWjou4NdhVvSYSL4HNwSN4h3UazhJw=; b=Rci7+gLx4Tbi1TL8OgZtYmVP1HMpD1xzmtppbJUWcY6pU6OkpAZZ2iDOs9XOEKkiDJ 79OJYwPSl4YoaJ+GCciZ1/jaPuFTk3HmmvDt+1g4/w7NhpP5MLTCvWACYKMqT73I0Snv jXKDHkHusK76liqhNDwU1KwgsaC9o4MeHFxw4= 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 :cc:content-type:content-transfer-encoding; b=KQePlNSk0dHblBym8eX7tyEAAr4b4DDm6EQCwo/MfiSJiSpShvl++0yqv8cVZQQrw0 7k0LxZomnNBZChU0ZOLYltKfC28nC/uptxI7jWM4U7PyabTo59obSfUkxtpUJdFUlHTW IujRYleM/kj01kfZr23w99PE3/5wePbdGpPWM= MIME-Version: 1.0 Received: by 10.142.185.13 with SMTP id i13mr2231344wff.234.1278946767405; Mon, 12 Jul 2010 07:59:27 -0700 (PDT) Received: by 10.142.82.17 with HTTP; Mon, 12 Jul 2010 07:59:27 -0700 (PDT) In-Reply-To: <1278584577.20321.2.camel@localhost> References: <1278583087.20321.0.camel@localhost> <1278584577.20321.2.camel@localhost> Date: Mon, 12 Jul 2010 16:59:27 +0200 Message-ID: Subject: Re: Possible bug in onenand_base ? From: =?UTF-8?Q?Enric_Balletb=C3=B2_i_Serra?= To: dedekind1@gmail.com Cc: Kyungmin Park , linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org, Rohit Hagargundgi Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 12 Jul 2010 14:59:30 +0000 (UTC) diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 26caf25..a39d906 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -377,7 +377,7 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le default: block = onenand_block(this, addr); - page = (int) (addr - onenand_addr(this, block)) >> this->page_shift; + page = (int) (addr >> this->page_shift);