Skip to content

Commit e61eb2e

Browse files
Yang ZhangJens Axboe
authored andcommitted
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: Yang Zhang <kthreadd@gmail.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
1 parent b9f985b commit e61eb2e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎block/genhd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static struct blk_major_name {
239239
} *major_names[BLKDEV_MAJOR_HASH_SIZE];
240240

241241
/* index in the above - for now: assume no multimajor ranges */
242-
static inline int major_to_index(int major)
242+
static inline int major_to_index(unsigned major)
243243
{
244244
return major % BLKDEV_MAJOR_HASH_SIZE;
245245
}

‎fs/char_dev.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static struct char_device_struct {
5959
} *chrdevs[CHRDEV_MAJOR_HASH_SIZE];
6060

6161
/* index in the above */
62-
static inline int major_to_index(int major)
62+
static inline int major_to_index(unsigned major)
6363
{
6464
return major % CHRDEV_MAJOR_HASH_SIZE;
6565
}

0 commit comments

Comments
 (0)