From: Alexander Aring <alex.aring@googlemail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] mtd: fix compiler warnings
Date: Mon, 3 Sep 2012 07:58:00 +0200 [thread overview]
Message-ID: <1346651881-3765-1-git-send-email-alex.aring@gmail.com> (raw)
Fix some compiler warnings.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
drivers/mtd/core.c | 6 +++---
drivers/mtd/mtdraw.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 5510439..3dcc908 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -79,7 +79,7 @@ static ssize_t mtd_write(struct cdev* cdev, const void *buf, size_t _count,
return -EINVAL;
}
- dev_dbg(cdev->dev, "write: 0x%08lx 0x%08x\n", offset, count);
+ dev_dbg(cdev->dev, "write: 0x%08lx 0x%08lx\n", offset, count);
while (count) {
now = count > mtd->writesize ? mtd->writesize : count;
@@ -100,7 +100,7 @@ static ssize_t mtd_write(struct cdev* cdev, const void *buf, size_t _count,
ret = mtd->write(mtd, offset, now, &retlen,
buf);
dev_dbg(cdev->dev,
- "offset: 0x%08lx now: 0x%08x retlen: 0x%08x\n",
+ "offset: 0x%08lx now: 0x%08lx retlen: 0x%08lx\n",
offset, now, retlen);
}
if (ret)
@@ -174,7 +174,7 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
}
#ifdef CONFIG_MTD_WRITE
-static ssize_t mtd_erase(struct cdev *cdev, size_t count, loff_t offset)
+static int mtd_erase(struct cdev *cdev, size_t count, loff_t offset)
{
struct mtd_info *mtd = cdev->priv;
struct erase_info erase;
diff --git a/drivers/mtd/mtdraw.c b/drivers/mtd/mtdraw.c
index 24f7358..9961a75 100644
--- a/drivers/mtd/mtdraw.c
+++ b/drivers/mtd/mtdraw.c
@@ -137,7 +137,7 @@ static ssize_t mtdraw_read(struct cdev *cdev, void *buf, size_t count,
retlen += ret;
}
if (ret < 0)
- printf("err %d\n", ret);
+ printf("err %lu\n", ret);
else
ret = retlen;
return ret;
@@ -222,7 +222,7 @@ static ssize_t mtdraw_write(struct cdev *cdev, const void *buf, size_t count,
}
}
-static ssize_t mtdraw_erase(struct cdev *cdev, size_t count, loff_t _offset)
+static int mtdraw_erase(struct cdev *cdev, size_t count, loff_t _offset)
{
struct mtd_info *mtd = to_mtd(cdev);
struct erase_info erase;
--
1.7.12
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2012-09-03 5:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 5:58 Alexander Aring [this message]
2012-09-03 5:58 ` [PATCH 2/2] mtd: add private data to mtddev-hook Alexander Aring
2012-09-03 9:06 ` [PATCH 1/2] mtd: fix compiler warnings Sascha Hauer
2012-09-05 15:25 ` Jan Lübbe
2012-09-05 18:53 ` Alexander Aring
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=1346651881-3765-1-git-send-email-alex.aring@gmail.com \
--to=alex.aring@googlemail.com \
--cc=barebox@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