md: change a few 'int' to 'size_t' in md
authorNeilBrown <neilb@suse.de>
Wed, 6 Feb 2008 09:39:57 +0000 (01:39 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 6 Feb 2008 18:41:19 +0000 (10:41 -0800)
As suggested by Andrew Morton.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/md.c

index 6cdd1b4faca69df171161392d4c4f5c72e6b8981..f08b6e786c0af8a2d6091c9a8a3cc8ef277c2a50 100644 (file)
@@ -1800,7 +1800,7 @@ static ssize_t
 state_show(mdk_rdev_t *rdev, char *page)
 {
        char *sep = "";
-       int len=0;
+       size_t len = 0;
 
        if (test_bit(Faulty, &rdev->flags)) {
                len+= sprintf(page+len, "%sfaulty",sep);
@@ -2318,7 +2318,7 @@ level_show(mddev_t *mddev, char *page)
 static ssize_t
 level_store(mddev_t *mddev, const char *buf, size_t len)
 {
-       int rv = len;
+       ssize_t rv = len;
        if (mddev->pers)
                return -EBUSY;
        if (len == 0)
@@ -2805,7 +2805,7 @@ metadata_store(mddev_t *mddev, const char *buf, size_t len)
                return len;
        }
        if (strncmp(buf, "external:", 9) == 0) {
-               int namelen = len-9;
+               size_t namelen = len-9;
                if (namelen >= sizeof(mddev->metadata_type))
                        namelen = sizeof(mddev->metadata_type)-1;
                strncpy(mddev->metadata_type, buf+9, namelen);