summaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-24 10:52:15 +0300
committerJens Axboe <axboe@kernel.dk>2021-08-24 15:42:32 +0300
commit539711d7d6fe382a73254cc966602e63242a6fb3 (patch)
tree44bcc20baddc4b30bc40bcaf20f15088b1fc6f5f /block/genhd.c
parent10e7123d5551dec0025f70e61604ab57483a6ed2 (diff)
downloadlinux-539711d7d6fe382a73254cc966602e63242a6fb3.tar.xz
block: remove a pointless call to MINOR() in device_add_disk
blk_alloc_ext_minor already returns just a minor number, so no need to mask the high bits. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210824075216.1179406-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c
index a925f773145f..f13b7eb0238b 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -457,7 +457,7 @@ int device_add_disk(struct device *parent, struct gendisk *disk,
if (ret < 0)
return ret;
disk->major = BLOCK_EXT_MAJOR;
- disk->first_minor = MINOR(ret);
+ disk->first_minor = ret;
disk->flags |= GENHD_FL_EXT_DEVT;
}