Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH] scsi: sd_zbc: use PAGE_SECTORS_SHIFT
@ 2023-06-13 12:31 Johannes Thumshirn
  2023-06-13 12:52 ` Niklas Cassel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2023-06-13 12:31 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: linux-scsi, Luis Chamberlain, Johannes Thumshirn

Use PAGE_SECTORS_SHIFT instead of open-coding it.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 drivers/scsi/sd_zbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 22801c24ea19..abbd08933ac7 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -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);

---
base-commit: 467e6cc73ef290f0099b1b86cec4f14060984916
change-id: 20230613-sd_zbc-page_sectors-f462501f7ab4

Best regards,
-- 
Johannes Thumshirn <johannes.thumshirn@wdc.com>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-22  1:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-13 12:31 [PATCH] scsi: sd_zbc: use PAGE_SECTORS_SHIFT Johannes Thumshirn
2023-06-13 12:52 ` Niklas Cassel
2023-06-15  1:52 ` Martin K. Petersen
2023-06-22  1:26 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox