]> www.infradead.org Git - users/hch/misc.git/commit
nvme-pci: refactor nvme_pci_use_sgls
authorChristoph Hellwig <hch@lst.de>
Tue, 17 Jun 2025 05:18:56 +0000 (07:18 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 17 Jun 2025 05:26:52 +0000 (07:26 +0200)
commita57cce888a3ae6110c9136062e7d0948c28e9cf0
treeb4b8dc6591b25710f188560cd62f98230a6b50c4
parent3879ef2f843e5456834ece8cc5f3fc68e354ffd9
nvme-pci: refactor nvme_pci_use_sgls

Move the average segment size into a separate helper, and return a
tristate to distinguish the case where can use SGL vs where we have to
use SGLs.  This will allow the simplify the code and make more efficient
decisions in follow on changes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c