Module Name:    src
Committed By:   jakllsch
Date:           Thu Nov 29 18:53:42 UTC 2018

Modified Files:
        src/sys/dev/usb: if_run.c

Log Message:
Correct abuses of aprint_error_dev(9).


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_run.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/if_run.c
diff -u src/sys/dev/usb/if_run.c:1.30 src/sys/dev/usb/if_run.c:1.31
--- src/sys/dev/usb/if_run.c:1.30	Wed Sep 12 21:57:18 2018
+++ src/sys/dev/usb/if_run.c	Thu Nov 29 18:53:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_run.c,v 1.30 2018/09/12 21:57:18 christos Exp $	*/
+/*	$NetBSD: if_run.c,v 1.31 2018/11/29 18:53:42 jakllsch Exp $	*/
 /*	$OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.30 2018/09/12 21:57:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.31 2018/11/29 18:53:42 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -638,7 +638,7 @@ run_attach(device_t parent, device_t sel
 	/* retrieve RF rev. no and various other things from EEPROM */
 	run_read_eeprom(sc);
 
-	aprint_error_dev(sc->sc_dev,
+	aprint_verbose_dev(sc->sc_dev,
 	    "MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), address %s\n",
 	    sc->mac_ver, sc->mac_rev, run_get_rf(sc->rf_rev), sc->ntxchains,
 	    sc->nrxchains, ether_sprintf(ic->ic_myaddr));
@@ -915,12 +915,12 @@ run_load_microcode(struct run_softc *sc)
 		fwname = "run-rt2870";
 
 	if ((error = firmware_load("run", fwname, &ucode, &size)) != 0) {
-		aprint_error_dev(sc->sc_dev,
+		device_printf(sc->sc_dev,
 		    "error %d, could not read firmware %s\n", error, fwname);
 		return error;
 	}
 	if (size != 4096) {
-		aprint_error_dev(sc->sc_dev,
+		device_printf(sc->sc_dev,
 		    "invalid firmware size (should be 4KB)\n");
 		firmware_free(ucode, size);
 		return EINVAL;
@@ -955,7 +955,7 @@ run_load_microcode(struct run_softc *sc)
 		usbd_delay_ms(sc->sc_udev, 10);
 	}
 	if (ntries == 1000) {
-		aprint_error_dev(sc->sc_dev,
+		device_printf(sc->sc_dev,
 		    "timeout waiting for MCU to initialize\n");
 		return ETIMEDOUT;
 	}
@@ -2646,7 +2646,7 @@ run_watchdog(struct ifnet *ifp)
 
 	if (sc->sc_tx_timer > 0) {
 		if (--sc->sc_tx_timer == 0) {
-			aprint_error_dev(sc->sc_dev, "device timeout\n");
+			device_printf(sc->sc_dev, "device timeout\n");
 			/* run_init(ifp); XXX needs a process context! */
 			ifp->if_oerrors++;
 			return;
@@ -4516,7 +4516,7 @@ run_init(struct ifnet *ifp)
 
 	if ((sc->sc_flags & RUN_FWLOADED) == 0 &&
 	    (error = run_load_microcode(sc)) != 0) {
-		aprint_error_dev(sc->sc_dev,
+		device_printf(sc->sc_dev,
 		    "could not load 8051 microcode\n");
 		goto fail;
 	}
@@ -4547,7 +4547,7 @@ run_init(struct ifnet *ifp)
 		usbd_delay_ms(sc->sc_udev, 10);
 	}
 	if (ntries == 100) {
-		aprint_error_dev(sc->sc_dev,
+		device_printf(sc->sc_dev,
 		    "timeout waiting for DMA engine\n");
 		error = ETIMEDOUT;
 		goto fail;
@@ -4565,7 +4565,7 @@ run_init(struct ifnet *ifp)
 	run_write(sc, RT2860_USB_DMA_CFG, 0);
 
 	if ((error = run_reset(sc)) != 0) {
-		aprint_error_dev(sc->sc_dev, "could not reset chipset\n");
+		device_printf(sc->sc_dev, "could not reset chipset\n");
 		goto fail;
 	}
 
@@ -4625,7 +4625,7 @@ run_init(struct ifnet *ifp)
 	usbd_delay_ms(sc->sc_udev, 10);
 
 	if ((error = run_bbp_init(sc)) != 0) {
-		aprint_error_dev(sc->sc_dev, "could not initialize BBP\n");
+		device_printf(sc->sc_dev, "could not initialize BBP\n");
 		goto fail;
 	}
 

Reply via email to