提交 e61eb2e9 编写于 作者: Y Yang Zhang 提交者: Jens Axboe

fs/block: type signature of major_to_index(int) to major_to_index(unsigned)

The major/minor device numbers are always defined and used as `unsigned'.
Signed-off-by: NYang Zhang <kthreadd@gmail.com>
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 b9f985b6
...@@ -239,7 +239,7 @@ static struct blk_major_name { ...@@ -239,7 +239,7 @@ static struct blk_major_name {
} *major_names[BLKDEV_MAJOR_HASH_SIZE]; } *major_names[BLKDEV_MAJOR_HASH_SIZE];
/* index in the above - for now: assume no multimajor ranges */ /* 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; return major % BLKDEV_MAJOR_HASH_SIZE;
} }
......
...@@ -59,7 +59,7 @@ static struct char_device_struct { ...@@ -59,7 +59,7 @@ static struct char_device_struct {
} *chrdevs[CHRDEV_MAJOR_HASH_SIZE]; } *chrdevs[CHRDEV_MAJOR_HASH_SIZE];
/* index in the above */ /* 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; return major % CHRDEV_MAJOR_HASH_SIZE;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册