From e835b24efdb11a6b736e4242bb69ecd75155976e Mon Sep 17 00:00:00 2001 From: Fuqian Huang Date: Mon, 17 Jun 2019 15:31:50 +0800 Subject: [PATCH] qlxgbe: replace device_printf with QL_DPRINT2 in ql_os.c QL_DPRINT2 checks the debug level first and then prints. Replace device_printf with QL_DPRINT2 to check debug level first before printing out the kernel pointers. Signed-off-by: Fuqian Huang --- sys/dev/qlxgbe/ql_os.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/qlxgbe/ql_os.c b/sys/dev/qlxgbe/ql_os.c index 8cbd67f8cd5..f0ff57940ce 100644 --- a/sys/dev/qlxgbe/ql_os.c +++ b/sys/dev/qlxgbe/ql_os.c @@ -417,10 +417,10 @@ qla_pci_attach(device_t dev) __func__); goto qla_pci_attach_err; } - device_printf(dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" + QL_DPRINT2(2, (dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" " msix_count 0x%x pci_reg %p pci_reg1 %p num_rcvq = %d\n", __func__, ha, ha->pci_func, rsrc_len, ha->msix_count, - ha->pci_reg, ha->pci_reg1, num_rcvq); + ha->pci_reg, ha->pci_reg1, num_rcvq)); if ((ha->msix_count < 64) || (num_rcvq != 32)) { if (ha->hw.num_sds_rings > 15) { @@ -1295,9 +1295,9 @@ qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, "mbuf = %p\n", __func__, __LINE__, txr_idx, tx_idx,\ ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head)); - device_printf(ha->pci_dev, "%s [%d]: txr_idx = %d tx_idx = %d " + QL_DPRINT2(ha, (ha->pci_dev, "%s [%d]: txr_idx = %d tx_idx = %d " "mbuf = %p\n", __func__, __LINE__, txr_idx, tx_idx, - ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head); + ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head)); if (m_head) m_freem(m_head); -- 2.11.0