tree cd0be3d4dd273c31a04b9ccfd63f296fe4969a04
parent 50da7f60960a2e39aa8784983c580a3ddfd9bd8d
author Thomas Gleixner <[EMAIL PROTECTED]> Sat, 19 Mar 2005 22:40:47 +0000
committer Thomas Gleixner <[EMAIL PROTECTED]> Mon, 23 May 2005 13:00:18 +0200

[MTD] block2mtd: Fix incompatible pointer type

Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>

 drivers/mtd/devices/block2mtd.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -1,5 +1,5 @@
 /*
- * $Id: block2mtd.c,v 1.25 2005/03/07 20:29:05 joern Exp $
+ * $Id: block2mtd.c,v 1.28 2005/03/19 22:40:44 gleixner Exp $
  *
  * block2mtd.c - create an mtd from a block device
  *
@@ -19,7 +19,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/buffer_head.h>
 
-#define VERSION "$Revision: 1.24 $"
+#define VERSION "$Revision: 1.28 $"
 
 
 #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args)
@@ -88,7 +88,6 @@ void cache_readahead(struct address_spac
 static struct page* page_readahead(struct address_space *mapping, int index)
 {
        filler_t *filler = (filler_t*)mapping->a_ops->readpage;
-       //do_page_cache_readahead(mapping, index, XXX, 64);
        cache_readahead(mapping, index);
        return read_cache_page(mapping, index, filler, NULL);
 }
@@ -369,16 +368,16 @@ static int ustrtoul(const char *cp, char
 }
 
 
-static int parse_num32(u32 *num32, const char *token)
+static int parse_num(size_t *num, const char *token)
 {
        char *endp;
-       unsigned long n;
+       size_t n;
 
-       n = ustrtoul(token, &endp, 0);
+       n = (size_t) ustrtoul(token, &endp, 0);
        if (*endp)
                return -EINVAL;
 
-       *num32 = n;
+       *num = n;
        return 0;
 }
 
@@ -421,7 +420,7 @@ static int block2mtd_setup(const char *v
        char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */
        char *token[2];
        char *name;
-       u32 erase_size = PAGE_SIZE;
+       size_t erase_size = PAGE_SIZE;
        int i, ret;
 
        if (strnlen(val, sizeof(buf)) >= sizeof(buf))
@@ -448,7 +447,7 @@ static int block2mtd_setup(const char *v
                return 0;
 
        if (token[1]) {
-               ret = parse_num32(&erase_size, token[1]);
+               ret = parse_num(&erase_size, token[1]);
                if (ret)
                        parse_err("illegal erase size");
        }
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to