fs/block: type signature of major_to_index(int) to major_to_index(unsigned)
authorYang Zhang <kthreadd@gmail.com>
Fri, 17 Dec 2010 08:00:18 +0000 (09:00 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Fri, 17 Dec 2010 08:00:18 +0000 (09:00 +0100)
The major/minor device numbers are always defined and used as `unsigned'.

Signed-off-by: Yang Zhang <kthreadd@gmail.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/genhd.c
fs/char_dev.c

index 79b9e32..16ccc0d 100644 (file)
@@ -239,7 +239,7 @@ static struct blk_major_name {
 } *major_names[BLKDEV_MAJOR_HASH_SIZE];
 
 /* index in the above - for now: assume no multimajor ranges */
-static inline int major_to_index(int major)
+static inline int major_to_index(unsigned major)
 {
        return major % BLKDEV_MAJOR_HASH_SIZE;
 }
index e5b9df9..143f020 100644 (file)
@@ -59,7 +59,7 @@ static struct char_device_struct {
 } *chrdevs[CHRDEV_MAJOR_HASH_SIZE];
 
 /* index in the above */
-static inline int major_to_index(int major)
+static inline int major_to_index(unsigned major)
 {
        return major % CHRDEV_MAJOR_HASH_SIZE;
 }