git: d96f81b0c5ae - main - qlxge: Inline the one use of a variable only used in a debug trace.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 21 Apr 2022 21:04:34 UTC
The branch main has been updated by jhb:

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

commit d96f81b0c5ae02aae3225e62dddc7ec39f1096af
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-21 21:01:02 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-21 21:01:02 +0000

    qlxge: Inline the one use of a variable only used in a debug trace.
    
    The other QL_DPRINT*() invocations in qls_init_hw_if() all used the
    expanded form instead of the local variable.  The module build always
    defines QL_DBG in CFLAGS so doesn't trip over this, but adding qlxge
    to a kernel config builds without QL_DBG.
    
    Reported by:    olivier
---
 sys/dev/qlxge/qls_hw.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/dev/qlxge/qls_hw.c b/sys/dev/qlxge/qls_hw.c
index 0fda6da46ebc..3cb2656a1cd5 100644
--- a/sys/dev/qlxge/qls_hw.c
+++ b/sys/dev/qlxge/qls_hw.c
@@ -808,15 +808,12 @@ qls_del_hw_if(qla_host_t *ha)
 int
 qls_init_hw_if(qla_host_t *ha)
 {
-	device_t	dev;
 	uint32_t	value;
 	int		ret = 0;
 	int		i;
 
 	QL_DPRINT2((ha->pci_dev, "%s:enter\n", __func__));
 
-	dev = ha->pci_dev;
-
 	ret = qls_hw_reset(ha);
 	if (ret)
 		goto qls_init_hw_if_exit;
@@ -929,7 +926,8 @@ qls_init_hw_if(qla_host_t *ha)
 		Q81_WR_LBQ_PROD_IDX(i, ha->rx_ring[i].lbq_in);
 		Q81_WR_SBQ_PROD_IDX(i, ha->rx_ring[i].sbq_in);
 
-		QL_DPRINT2((dev, "%s: [wq_idx, cq_idx, lbq_idx, sbq_idx]"
+		QL_DPRINT2((ha->pci_dev,
+			"%s: [wq_idx, cq_idx, lbq_idx, sbq_idx]"
 			"[0x%08x, 0x%08x, 0x%08x, 0x%08x]\n", __func__,
 			Q81_RD_WQ_IDX(i), Q81_RD_CQ_IDX(i), Q81_RD_LBQ_IDX(i),
 			Q81_RD_SBQ_IDX(i)));