Message ID | 20230613-sd_zbc-page_sectors-v1-1-363460a4413d@wdc.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | scsi: sd_zbc: use PAGE_SECTORS_SHIFT | expand |
On Tue, Jun 13, 2023 at 05:31:45AM -0700, Johannes Thumshirn wrote: > 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> > Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Johannes,
> Use PAGE_SECTORS_SHIFT instead of open-coding it.
Applied to 6.5/scsi-staging, thanks!
On Tue, 13 Jun 2023 05:31:45 -0700, Johannes Thumshirn wrote: > Use PAGE_SECTORS_SHIFT instead of open-coding it. > > Applied to 6.5/scsi-queue, thanks! [1/1] scsi: sd_zbc: use PAGE_SECTORS_SHIFT https://git.kernel.org/mkp/scsi/c/ce31dc540a01
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);
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(-) --- base-commit: 467e6cc73ef290f0099b1b86cec4f14060984916 change-id: 20230613-sd_zbc-page_sectors-f462501f7ab4 Best regards,