mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 15:02:40 -04:00
block: use bdev_alignment_offset in disk_alignment_offset_show
This does the same as the open coded variant except for an extra branch, and allows to remove queue_alignment_offset entirely. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20220415045258.199825-18-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
64dcc7c271
commit
640f2a2391
@@ -1010,7 +1010,7 @@ static ssize_t disk_alignment_offset_show(struct device *dev,
|
||||
{
|
||||
struct gendisk *disk = dev_to_disk(dev);
|
||||
|
||||
return sprintf(buf, "%d\n", queue_alignment_offset(disk->queue));
|
||||
return sprintf(buf, "%d\n", bdev_alignment_offset(disk->part0));
|
||||
}
|
||||
|
||||
static ssize_t disk_discard_alignment_show(struct device *dev,
|
||||
|
||||
Reference in New Issue
Block a user