Skip to content

Commit

Permalink
fs/block: type signature of major_to_index(int) to major_to_index(uns…
Browse files Browse the repository at this point in the history
…igned)

The major/minor device numbers are always defined and used as `unsigned'.

Signed-off-by: Yang Zhang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Yang Zhang authored and Jens Axboe committed Dec 17, 2010
1 parent b9f985b commit e61eb2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion fs/char_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e61eb2e

Please sign in to comment.