mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
block: Fix discard alignment calculation and printing
Discard alignment reporting for partitions was incorrect. Update to match the algorithm used elsewhere. The alignment can be negative (misaligned). Fix format string accordingly. Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
fe0b393f2c
commit
dd3d145d49
2 changed files with 6 additions and 3 deletions
|
|
@ -867,7 +867,7 @@ static ssize_t disk_discard_alignment_show(struct device *dev,
|
|||
{
|
||||
struct gendisk *disk = dev_to_disk(dev);
|
||||
|
||||
return sprintf(buf, "%u\n", queue_discard_alignment(disk->queue));
|
||||
return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue));
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(range, S_IRUGO, disk_range_show, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue