[PATCH 5/5] nvme-pci: move iod dma_len to better pack

Keith Busch kbusch at fb.com
Thu Jul 28 15:11:51 PDT 2022


From: Keith Busch <kbusch at kernel.org>

The 32-bit 'dma_len' field packs in the iod struct above the dma_addr_t
without creating a gap.

Signed-off-by: Keith Busch <kbusch at kernel.org>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 546de3c2000b..66f7204ab905 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -230,8 +230,8 @@ struct nvme_iod {
 	bool aborted;
 	s8 npages;		/* In the PRP list. 0 means small pool in use */
 	s8 nents;		/* Used in scatterlist */
-	dma_addr_t first_dma;
 	unsigned int dma_len;	/* length of single DMA segment mapping */
+	dma_addr_t first_dma;
 	dma_addr_t meta_dma;
 	struct scatterlist *sg;
 };
-- 
2.30.2




More information about the Linux-nvme mailing list