From patchwork Fri Jun 26 13:21:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 29189 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 56E64B7043 for ; Fri, 26 Jun 2009 23:24:43 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MKBNf-00082m-RN; Fri, 26 Jun 2009 13:22:16 +0000 Received: from rv-out-0708.google.com ([209.85.198.247]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MKBNX-0007zo-11 for linux-mtd@lists.infradead.org; Fri, 26 Jun 2009 13:22:13 +0000 Received: by rv-out-0708.google.com with SMTP id k29so751646rvb.42 for ; Fri, 26 Jun 2009 06:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=iUsI/NbUZZfeFXofcdZ7hGt/AIti87ScMiKkclDb7KI=; b=oG5jDgK0Xg82CS1B85bzzOm56r5MIDiBZgeU6FgG973ksyz1MO3QxM2pdTAtDSIUTT kjOnHiXDOpp4b5nXvxX9c9ggmpghZPDPGnVGI4KP8jIhN82LxvqwhRkt70S+csB5BIz3 /K4j1WdaBIl39AThXgjqStaHF3Lvg5NEo5fFs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=lzWRXqblpSWq0+vAXFY63KsCxhtV3hzwLZGeXSYx3ZMUB5VrO+HxOAKBsa4JJ4opFF aOb8sxZ2hFnRBXSeOctfbQLXlMTaIiaEaTuiwetR8maali+SVUArNH/R5sCvrNGycNoH dPi8K5arTrebBZ5EtQhBRYH6gbaRIiJAqbMSc= Received: by 10.140.157.1 with SMTP id f1mr3094266rve.299.1246022524931; Fri, 26 Jun 2009 06:22:04 -0700 (PDT) Received: from localhost ([119.122.163.209]) by mx.google.com with ESMTPS id l31sm15007359rvb.3.2009.06.26.06.21.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Jun 2009 06:21:56 -0700 (PDT) From: tom.leiming@gmail.com To: dwmw2@infradead.org, linux-mtd@lists.infradead.org Subject: [PATCH][MTD][NAND]: fix omap2.c compile failure and warning Date: Fri, 26 Jun 2009 21:21:49 +0800 Message-Id: <1246022509-16194-1-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.6.0.GIT X-Spam-Score: 0.0 (/) Cc: david-b@pacbell.net, Ming Lei , linux-kernel@vger.kernel.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: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ming Lei 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' ...... drivers/mtd/nand/omap2.c: In function 'omap_wait': drivers/mtd/nand/omap2.c:545: warning: 'status' may be used uninitialized in this function Signed-off-by: Ming Lei --- drivers/mtd/nand/omap2.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 0cd76f8..2905c79 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -541,7 +542,8 @@ 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 state = this->state; + int status = 0; if (state == FL_ERASING) timeo += (HZ * 400) / 1000;