提交 539711d7 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

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: NChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210824075216.1179406-2-hch@lst.deSigned-off-by: NJens Axboe <axboe@kernel.dk>
上级 10e7123d
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册