From patchwork Fri Jun 26 17:02:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Singh, Vimal" X-Patchwork-Id: 29200 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 bilbo.ozlabs.org (Postfix) with ESMTPS id DDA63B708B for ; Sat, 27 Jun 2009 03:05:35 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MKEpY-0007u1-H0; Fri, 26 Jun 2009 17:03:17 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1MKEpM-0007bL-7v; Fri, 26 Jun 2009 17:03:11 +0000 Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n5QH2uws019696; Fri, 26 Jun 2009 12:03:01 -0500 Received: from webmail.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n5QH2o4D026037; Fri, 26 Jun 2009 12:02:52 -0500 (CDT) Received: from 192.168.10.89 (proxying for 10.24.255.18) (SquirrelMail authenticated user x0094262); by dbdmail.itg.ti.com with HTTP; Fri, 26 Jun 2009 22:32:53 +0530 (IST) Message-ID: <57946.192.168.10.89.1246035773.squirrel@dbdmail.itg.ti.com> In-Reply-To: <53729.192.168.10.89.1246035472.squirrel@dbdmail.itg.ti.com> References: <53729.192.168.10.89.1246035472.squirrel@dbdmail.itg.ti.com> Date: Fri, 26 Jun 2009 22:32:53 +0530 (IST) Subject: Re: [PATCH][MTD][NAND]: fix omap2.c compile failure and warning From: "vimal singh" To: "vimal singh" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-Spam-Score: 0.0 (/) Cc: "david-b@pacbell.net" , "tom.leiming@gmail.com" , David Woodhouse , "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Somehow I do not see below errors on compilation: drivers/mtd/nand/omap2.c: In function 'omap_wait': drivers/mtd/nand/omap2.c:543: error: 'jiffies' undeclared (first use in this function) drivers/mtd/nand/omap2.c:543: error: (Each undeclared identifier is reported only once drivers/mtd/nand/omap2.c:543: error: for each function it appears in.) drivers/mtd/nand/omap2.c:557: error: implicit declaration of function 'time_before' But still including 'linux/jiffies.h'. Below is the patch. Signed-off-by: Vimal Singh Signed-off-by: Ming Lei --- drivers/mtd/nand/omap2.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) timeo += (HZ * 400) / 1000; @@ -558,6 +560,7 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip) status = __raw_readb(this->IO_ADDR_R); if (!(status & 0x40)) break; + cond_resched(); } return status; } diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 0cd76f8..3b6e6ad 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include #include @@ -541,7 +543,7 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip) struct omap_nand_info *info = container_of(mtd, struct omap_nand_info, mtd); unsigned long timeo = jiffies; - int status, state = this->state; + int status = NAND_STATUS_FAIL, state = this->state; if (state == FL_ERASING)