From: Yang Zhang Date: Fri, 17 Dec 2010 08:00:18 +0000 (+0100) Subject: fs/block: type signature of major_to_index(int) to major_to_index(unsigned) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e61eb2e93fe86931d46831752a82dab25a5335ca;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Jens Axboe --- diff --git a/block/genhd.c b/block/genhd.c index 79b9e327f3c..16ccc0d2d5d 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 e5b9df993b9..143f0207c7e 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; }