git: c931cf6af08b - main - nvme: Slight simplification

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 13 May 2024 22:38:30 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=c931cf6af08b7d0abb29c90917dfe79a18235897

commit c931cf6af08b7d0abb29c90917dfe79a18235897
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-05-13 21:03:52 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-13 22:14:04 +0000

    nvme: Slight simplification
    
    We don't need to dereference qpair to get the ctrlr pointer each time,
    so use the cached value. It's not going to change. No change intended.
    
    Sponsored by:           Netflix
---
 sys/dev/nvme/nvme_qpair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
index dd26906a933b..4c5d5f3c1ea7 100644
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -1203,7 +1203,7 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr)
 
 	bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map,
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
-	bus_space_write_4(qpair->ctrlr->bus_tag, qpair->ctrlr->bus_handle,
+	bus_space_write_4(ctrlr->bus_tag, ctrlr->bus_handle,
 	    qpair->sq_tdbl_off, qpair->sq_tail);
 	qpair->num_cmds++;
 }