[PATCH 4/9] nvme-pci: refactor nvme_pci_use_sgls
Christoph Hellwig
hch at lst.de
Wed Jun 11 22:00:00 PDT 2025
On Wed, Jun 11, 2025 at 03:43:36PM +0200, Daniel Gomez wrote:
> > - if (nvme_pci_use_sgls(dev, req, iod->sgt.nents))
> > + if (use_sgl == SGL_FORCED ||
> > + (use_sgl == SGL_SUPPORTED &&
>
> FORCED implies SUPPORTED, what about simplifying to:
>
> if (use_sgl >= SGL_SUPPORTED)
>
> or just do:
>
> if (use_sgl)
For forced we unconditionally enter the sgl branch, for supported
we also need an additional condition.
More information about the Linux-nvme
mailing list