Skip to content

Commit

Permalink
scsi: sd: sd_zbc: Use PAGE_SECTORS_SHIFT
Browse files Browse the repository at this point in the history
Use PAGE_SECTORS_SHIFT instead of open-coding it.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20230613-sd_zbc-page_sectors-v1-1-363460a4413d@wdc.com
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Johannes Thumshirn authored and Martin K. Petersen committed Jun 16, 2023
1 parent e3d5562 commit ce31dc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/sd_zbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ int sd_zbc_revalidate_zones(struct scsi_disk *sdkp)
}

max_append = min_t(u32, logical_to_sectors(sdkp->device, zone_blocks),
q->limits.max_segments << (PAGE_SHIFT - 9));
q->limits.max_segments << PAGE_SECTORS_SHIFT);
max_append = min_t(u32, max_append, queue_max_hw_sectors(q));

blk_queue_max_zone_append_sectors(q, max_append);
Expand Down

0 comments on commit ce31dc5

Please sign in to comment.