]> www.infradead.org Git - users/hch/misc.git/commit
nvme-pci: refactor nvme_pci_use_sgls
authorChristoph Hellwig <hch@lst.de>
Thu, 5 Jun 2025 06:25:16 +0000 (08:25 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 10 Jun 2025 04:52:35 +0000 (06:52 +0200)
commit82648d6f410bfcb585e0ea0f6cd66c3d615a0c92
tree9b8cc3091d1f7f3c70c21613d4738acf9aa0b859
parent9515c3aa3e90b2cf8b7d3bfdf1fbdcbb7f92d279
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