diff options
author | Christoph Hellwig <hch@lst.de> | 2021-08-24 09:52:15 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-24 14:42:32 +0200 |
commit | 539711d7d6fe382a73254cc966602e63242a6fb3 (patch) | |
tree | 44bcc20baddc4b30bc40bcaf20f15088b1fc6f5f /block | |
parent | null_blk: add error handling support for add_disk() (diff) | |
download | linux-539711d7d6fe382a73254cc966602e63242a6fb3.tar.xz linux-539711d7d6fe382a73254cc966602e63242a6fb3.zip |
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')
-rw-r--r-- | block/genhd.c | 2 |
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; } |