Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2023 19:00:34 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0e0d2636d4b1 - stable/13 - bhyve ahci: Replace WPRINTF with EPRINTLN
Message-ID:  <202310241900.39OJ0YUL033390@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

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

commit 0e0d2636d4b1d6ed9aabaf873461db6f330bc4b5
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-10-13 19:26:58 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-10-24 18:44:14 +0000

    bhyve ahci: Replace WPRINTF with EPRINTLN
    
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D42181
    
    (cherry picked from commit edd2a9b887864d07ac5af480b4b8f35cb76443f6)
---
 usr.sbin/bhyve/pci_ahci.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c
index 61679b1b2245..863c504d2dc6 100644
--- a/usr.sbin/bhyve/pci_ahci.c
+++ b/usr.sbin/bhyve/pci_ahci.c
@@ -117,7 +117,6 @@ static FILE *dbg;
 #else
 #define DPRINTF(format, arg...)
 #endif
-#define WPRINTF(format, arg...) printf(format, ##arg)
 
 #define AHCI_PORT_IDENT 20 + 1
 
@@ -342,7 +341,7 @@ ahci_write_fis(struct ahci_port *p, enum sata_fis_type ft, uint8_t *fis)
 		irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_PS : 0;
 		break;
 	default:
-		WPRINTF("unsupported fis type %d", ft);
+		EPRINTLN("unsupported fis type %d", ft);
 		return;
 	}
 	if (fis[2] & ATA_S_ERROR) {
@@ -1801,7 +1800,7 @@ ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis)
 			handle_packet_cmd(p, slot, cfis);
 		break;
 	default:
-		WPRINTF("Unsupported cmd:%02x", cfis[2]);
+		EPRINTLN("Unsupported cmd:%02x", cfis[2]);
 		ahci_write_fis_d2h(p, slot, cfis,
 		    (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR);
 		break;
@@ -1846,7 +1845,7 @@ ahci_handle_slot(struct ahci_port *p, int slot)
 #endif
 
 	if (cfis[0] != FIS_TYPE_REGH2D) {
-		WPRINTF("Not a H2D FIS:%02x", cfis[0]);
+		EPRINTLN("Not a H2D FIS:%02x", cfis[0]);
 		return;
 	}
 
@@ -2133,7 +2132,7 @@ pci_ahci_port_write(struct pci_ahci_softc *sc, uint64_t offset, uint64_t value)
 	case AHCI_P_TFD:
 	case AHCI_P_SIG:
 	case AHCI_P_SSTS:
-		WPRINTF("pci_ahci_port: read only registers 0x%"PRIx64"", offset);
+		EPRINTLN("pci_ahci_port: read only registers 0x%"PRIx64"", offset);
 		break;
 	case AHCI_P_SCTL:
 		p->sctl = value;
@@ -2208,7 +2207,7 @@ pci_ahci_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size,
 	else if (offset < (uint64_t)AHCI_OFFSET + sc->ports * AHCI_STEP)
 		pci_ahci_port_write(sc, offset, value);
 	else
-		WPRINTF("pci_ahci: unknown i/o write offset 0x%"PRIx64"", offset);
+		EPRINTLN("pci_ahci: unknown i/o write offset 0x%"PRIx64"", offset);
 
 	pthread_mutex_unlock(&sc->mtx);
 }
@@ -2306,7 +2305,7 @@ pci_ahci_read(struct pci_devinst *pi, int baridx, uint64_t regoff, int size)
 		value = pci_ahci_port_read(sc, offset);
 	else {
 		value = 0;
-		WPRINTF("pci_ahci: unknown i/o read offset 0x%"PRIx64"",
+		EPRINTLN("pci_ahci: unknown i/o read offset 0x%"PRIx64"",
 		    regoff);
 	}
 	value >>= 8 * (regoff & 0x3);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310241900.39OJ0YUL033390>