public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: tom.leiming@gmail.com
To: dwmw2@infradead.org, linux-mtd@lists.infradead.org
Cc: david-b@pacbell.net, Ming Lei <tom.leiming@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH][MTD][NAND]: fix omap2.c compile failure and warning
Date: Fri, 26 Jun 2009 21:21:49 +0800	[thread overview]
Message-ID: <1246022509-16194-1-git-send-email-tom.leiming@gmail.com> (raw)

From: Ming Lei <tom.leiming@gmail.com>

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 <tom.leiming@gmail.com>
---
 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 <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/io.h>
+#include <linux/jiffies.h>
 
 #include <asm/dma.h>
 
@@ -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;
-- 
1.6.0.GIT

             reply	other threads:[~2009-06-26 13:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 13:21 tom.leiming [this message]
2009-06-26 15:09 ` [PATCH][MTD][NAND]: fix omap2.c compile failure and warning David Woodhouse
2009-06-26 15:45   ` Singh, Vimal
2009-06-26 16:18     ` David Woodhouse
     [not found] <53729.192.168.10.89.1246035472.squirrel@dbdmail.itg.ti.com>
2009-06-26 17:02 ` vimal singh
2009-06-26 17:14   ` David Woodhouse
     [not found] ` <57946.192.168.10.89.1246035774.squirrel@dbdmail.itg.ti.com>
2009-06-27  5:37   ` vimal singh
2009-06-27  7:45     ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1246022509-16194-1-git-send-email-tom.leiming@gmail.com \
    --to=tom.leiming@gmail.com \
    --cc=david-b@pacbell.net \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox