diff --git a/block/genhd.c b/block/genhd.c index 79b9e327f3cb97b8ebc22e70f3e70aaf22e0ce43..16ccc0d2d5d367816700e7c2a88b773d3856810c 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -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; } diff --git a/fs/char_dev.c b/fs/char_dev.c index e5b9df993b934f0876666f7c50153a467ef7c939..143f0207c7eba6a355ab1ed7444e37b3aa11db7c 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -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; }