Skip to content

Commit 539711d

Browse files
Christoph Hellwigaxboe
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 10e7123 commit 539711d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/genhd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ int device_add_disk(struct device *parent, struct gendisk *disk,
457457
if (ret < 0)
458458
return ret;
459459
disk->major = BLOCK_EXT_MAJOR;
460-
disk->first_minor = MINOR(ret);
460+
disk->first_minor = ret;
461461
disk->flags |= GENHD_FL_EXT_DEVT;
462462
}
463463

0 commit comments

Comments
 (0)