mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 09:13:20 -05:00
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>
This commit is contained in:
parent
10e7123d55
commit
539711d7d6
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue