On 10/06/2025 07.06, Christoph Hellwig wrote: > Having a define in kiB units is a bit weird. Also update the > comment now that there is not scatterlist limit. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > --- > drivers/nvme/host/pci.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Daniel Gomez <da.gomez@xxxxxxxxxxx> > > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > index 2d3573293d0c..735f448d8db2 100644 > --- a/drivers/nvme/host/pci.c > +++ b/drivers/nvme/host/pci.c ... > @@ -3363,7 +3362,8 @@ static struct nvme_dev *nvme_pci_alloc_dev(struct pci_dev *pdev, > * over a single page. > */ > dev->ctrl.max_hw_sectors = min_t(u32, > - NVME_MAX_KB_SZ << 1, dma_opt_mapping_size(&pdev->dev) >> 9); > + NVME_MAX_BYTES >> SECTOR_SHIFT, > + dma_opt_mapping_size(&pdev->dev) >> 9); We use SECTOR_SHIFT for MAX_BYTES but not for the bytes returned from dma_opt_mapping_size(). Yes, I know this is not part of the change, but still is the same line. I think it make sense to convert it too.